1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6#include "nsISupports.idl"
7
8[scriptable, uuid(feb979a8-f8cc-4522-9dff-6c055ca50762)]
9interface nsIAudioDeviceInfo : nsISupports
10{
11  readonly attribute AString name;
12
13  readonly attribute AString groupId;
14
15  readonly attribute AString vendor;
16
17  // type: Unknown/Input/Output
18  const unsigned short TYPE_UNKNOWN = 0;
19  const unsigned short TYPE_INPUT   = 1;
20  const unsigned short TYPE_OUTPUT  = 2;
21  readonly attribute unsigned short type;
22
23  // state: Disabled/Unplugged/Enabled
24  const unsigned short STATE_DISABLED   = 0;
25  const unsigned short STATE_UNPLUGGED  = 1;
26  const unsigned short STATE_ENABLED    = 2;
27  readonly attribute unsigned short state;
28
29  // preferred: None/Multimedia/Voice/Notification/All
30  const unsigned short PREF_NONE          = 0x00;
31  const unsigned short PREF_MULTIMEDIA    = 0x01;
32  const unsigned short PREF_VOICE         = 0x02;
33  const unsigned short PREF_NOTIFICATION  = 0x04;
34  const unsigned short PREF_ALL           = 0x0F;
35  readonly attribute unsigned short preferred;
36
37  // supported format, default format: S16LE/S16BE/F32LE/F32BE
38  const unsigned short FMT_S16LE = 0x0010;
39  const unsigned short FMT_S16BE = 0x0020;
40  const unsigned short FMT_F32LE = 0x1000;
41  const unsigned short FMT_F32BE = 0x2000;
42  readonly attribute unsigned short supportedFormat;
43  readonly attribute unsigned short defaultFormat;
44
45  // Max number of channels: [1, 255]
46  readonly attribute unsigned long maxChannels;
47
48  readonly attribute unsigned long defaultRate;
49  readonly attribute unsigned long maxRate;
50  readonly attribute unsigned long minRate;
51
52  readonly attribute unsigned long maxLatency;
53  readonly attribute unsigned long minLatency;
54};
55