音频管理.md 67.8 KB
Newer Older
D
duangavin123 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# 音频管理<a name="ZH-CN_TOPIC_0000001162414649"></a>

-   [导入模块](#zh-cn_topic_0000001149807881_s56d19203690d4782bfc74069abb6bd71)
-   [权限](#zh-cn_topic_0000001149807881_section11257113618419)
-   [方法](#zh-cn_topic_0000001149807881_section1580114415416)
-   [getAudioManager\(\)](#zh-cn_topic_0000001149807881_section84581011418)
-   [枚举](#zh-cn_topic_0000001149807881_section115029181495)
-   [AudioVolumeType](#zh-cn_topic_0000001149807881_section92261857172218)
-   [DeviceFlag](#zh-cn_topic_0000001149807881_section11285183164210)
-   [DeviceRole](#zh-cn_topic_0000001149807881_section380038142619)
-   [DeviceType](#zh-cn_topic_0000001149807881_section11727420122710)
-   [附录](#zh-cn_topic_0000001149807881_section1933416317165)
-   [AudioManager](#zh-cn_topic_0000001149807881_section8265143814015)
    -   [setVolume\(AudioVolumeType, number, AsyncCallback<void\>\)](#zh-cn_topic_0000001149807881_section189141826104616)
    -   [setVolume\(AudioVolumeType, number\)](#zh-cn_topic_0000001149807881_section102021249114612)
    -   [getVolume\(AudioVolumeType, AsyncCallback<number\>\)](#zh-cn_topic_0000001149807881_section4387320194714)
    -   [getVolume\(AudioVolumeType\)](#zh-cn_topic_0000001149807881_section04121965119)
    -   [getMinVolume\(AudioVolumeType, AsyncCallback<number\>\)](#zh-cn_topic_0000001149807881_section188714283511)
    -   [getMinVolume\(AudioVolumeType\)](#zh-cn_topic_0000001149807881_section41556389511)
    -   [getMaxVolume\(AudioVolumeType, AsyncCallback<number\>\)](#zh-cn_topic_0000001149807881_section690395418516)
    -   [getMaxVolume\(AudioVolumeType\)](#zh-cn_topic_0000001149807881_section155151345217)
    -   [getDevices\(DeviceFlag, AsyncCallback<AudioDeviceDescriptors\>\)](#zh-cn_topic_0000001149807881_section11536182020523)
    -   [getDevices\(DeviceFlag\)](#zh-cn_topic_0000001149807881_section181733125210)

-   [AudioDeviceDescriptor](#zh-cn_topic_0000001149807881_section17427121913310)
-   [AudioDeviceDescriptors](#zh-cn_topic_0000001149807881_section5181155710523)

>![](public_sys-resources/icon-note.gif) **说明:** 
>由于权限问题,此部分功能在标准系统暂不可用,待更新。

## 导入模块<a name="zh-cn_topic_0000001149807881_s56d19203690d4782bfc74069abb6bd71"></a>
M
mamingshuai 已提交
32 33 34 35 36

```
import audio from '@ohos.multimedia.audio';
```

D
duangavin123 已提交
37
## 权限<a name="zh-cn_topic_0000001149807881_section11257113618419"></a>
M
mamingshuai 已提交
38 39 40



D
duangavin123 已提交
41 42 43
## 方法<a name="zh-cn_topic_0000001149807881_section1580114415416"></a>

## getAudioManager\(\)<a name="zh-cn_topic_0000001149807881_section84581011418"></a>
M
mamingshuai 已提交
44 45 46 47 48

获取音频管理器。

**返回值:**

D
duangavin123 已提交
49 50
<a name="zh-cn_topic_0000001149807881_table16391145317913"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row2391145319910"><th class="cellrowborder" valign="top" width="17.01%" id="mcps1.1.3.1.1"><p id="zh-cn_topic_0000001149807881_p13911353991"><a name="zh-cn_topic_0000001149807881_p13911353991"></a><a name="zh-cn_topic_0000001149807881_p13911353991"></a>类型</p>
M
mamingshuai 已提交
51
</th>
D
duangavin123 已提交
52
<th class="cellrowborder" valign="top" width="82.99%" id="mcps1.1.3.1.2"><p id="zh-cn_topic_0000001149807881_p193911531395"><a name="zh-cn_topic_0000001149807881_p193911531395"></a><a name="zh-cn_topic_0000001149807881_p193911531395"></a>说明</p>
M
mamingshuai 已提交
53 54 55
</th>
</tr>
</thead>
D
duangavin123 已提交
56
<tbody><tr id="zh-cn_topic_0000001149807881_row1339114531391"><td class="cellrowborder" valign="top" width="17.01%" headers="mcps1.1.3.1.1 "><p id="zh-cn_topic_0000001149807881_p1338931454713"><a name="zh-cn_topic_0000001149807881_p1338931454713"></a><a name="zh-cn_topic_0000001149807881_p1338931454713"></a><a href="#zh-cn_topic_0000001149807881_section8265143814015">AudioManager</a></p>
M
mamingshuai 已提交
57
</td>
D
duangavin123 已提交
58
<td class="cellrowborder" valign="top" width="82.99%" headers="mcps1.1.3.1.2 "><p id="zh-cn_topic_0000001149807881_p1039217531898"><a name="zh-cn_topic_0000001149807881_p1039217531898"></a><a name="zh-cn_topic_0000001149807881_p1039217531898"></a>音频管理类。</p>
M
mamingshuai 已提交
59 60 61 62 63 64 65 66 67 68 69
</td>
</tr>
</tbody>
</table>

**示例:**

```
var audioManager = audio.getAudioManager();
```

D
duangavin123 已提交
70 71 72
## 枚举<a name="zh-cn_topic_0000001149807881_section115029181495"></a>

## AudioVolumeType<a name="zh-cn_topic_0000001149807881_section92261857172218"></a>
M
mamingshuai 已提交
73

D
duangavin123 已提交
74
音频流类型。
M
mamingshuai 已提交
75

D
duangavin123 已提交
76 77
<a name="zh-cn_topic_0000001149807881_table689215633911"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row19892165613399"><th class="cellrowborder" valign="top" width="30.380000000000003%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0000001149807881_p148924564394"><a name="zh-cn_topic_0000001149807881_p148924564394"></a><a name="zh-cn_topic_0000001149807881_p148924564394"></a>名称</p>
M
mamingshuai 已提交
78
</th>
D
duangavin123 已提交
79
<th class="cellrowborder" valign="top" width="9.950000000000001%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0000001149807881_aace9cae4ba0d4939bfa048460f61c3c7"><a name="zh-cn_topic_0000001149807881_aace9cae4ba0d4939bfa048460f61c3c7"></a><a name="zh-cn_topic_0000001149807881_aace9cae4ba0d4939bfa048460f61c3c7"></a>默认值</p>
M
mamingshuai 已提交
80
</th>
D
duangavin123 已提交
81
<th class="cellrowborder" valign="top" width="59.67%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0000001149807881_p19892145616392"><a name="zh-cn_topic_0000001149807881_p19892145616392"></a><a name="zh-cn_topic_0000001149807881_p19892145616392"></a>描述</p>
M
mamingshuai 已提交
82 83 84
</th>
</tr>
</thead>
D
duangavin123 已提交
85
<tbody><tr id="zh-cn_topic_0000001149807881_row1389215612395"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p52851329122117"><a name="zh-cn_topic_0000001149807881_p52851329122117"></a><a name="zh-cn_topic_0000001149807881_p52851329122117"></a>MEDIA</p>
M
mamingshuai 已提交
86
</td>
D
duangavin123 已提交
87
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p2282152962115"><a name="zh-cn_topic_0000001149807881_p2282152962115"></a><a name="zh-cn_topic_0000001149807881_p2282152962115"></a>1</p>
M
mamingshuai 已提交
88
</td>
D
duangavin123 已提交
89
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p328012293211"><a name="zh-cn_topic_0000001149807881_p328012293211"></a><a name="zh-cn_topic_0000001149807881_p328012293211"></a>表示媒体。</p>
M
mamingshuai 已提交
90 91
</td>
</tr>
D
duangavin123 已提交
92
<tr id="zh-cn_topic_0000001149807881_row6892145616397"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p027662952110"><a name="zh-cn_topic_0000001149807881_p027662952110"></a><a name="zh-cn_topic_0000001149807881_p027662952110"></a>RINGTONE</p>
M
mamingshuai 已提交
93
</td>
D
duangavin123 已提交
94
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p17273229192113"><a name="zh-cn_topic_0000001149807881_p17273229192113"></a><a name="zh-cn_topic_0000001149807881_p17273229192113"></a>2</p>
M
mamingshuai 已提交
95
</td>
D
duangavin123 已提交
96
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p182452299212"><a name="zh-cn_topic_0000001149807881_p182452299212"></a><a name="zh-cn_topic_0000001149807881_p182452299212"></a>表示铃声。</p>
M
mamingshuai 已提交
97 98 99 100 101
</td>
</tr>
</tbody>
</table>

D
duangavin123 已提交
102
## DeviceFlag<a name="zh-cn_topic_0000001149807881_section11285183164210"></a>
M
mamingshuai 已提交
103

D
duangavin123 已提交
104
可获取的设备种类。
M
mamingshuai 已提交
105

D
duangavin123 已提交
106 107
<a name="zh-cn_topic_0000001149807881_table162856320422"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row928593124213"><th class="cellrowborder" valign="top" width="30.380000000000003%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0000001149807881_p628553124216"><a name="zh-cn_topic_0000001149807881_p628553124216"></a><a name="zh-cn_topic_0000001149807881_p628553124216"></a>名称</p>
M
mamingshuai 已提交
108
</th>
D
duangavin123 已提交
109
<th class="cellrowborder" valign="top" width="9.950000000000001%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0000001149807881_p1828512314213"><a name="zh-cn_topic_0000001149807881_p1828512314213"></a><a name="zh-cn_topic_0000001149807881_p1828512314213"></a>默认值</p>
M
mamingshuai 已提交
110
</th>
D
duangavin123 已提交
111
<th class="cellrowborder" valign="top" width="59.67%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0000001149807881_p1228612334216"><a name="zh-cn_topic_0000001149807881_p1228612334216"></a><a name="zh-cn_topic_0000001149807881_p1228612334216"></a>描述</p>
M
mamingshuai 已提交
112 113 114
</th>
</tr>
</thead>
D
duangavin123 已提交
115
<tbody><tr id="zh-cn_topic_0000001149807881_row2286435427"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p19184101242511"><a name="zh-cn_topic_0000001149807881_p19184101242511"></a><a name="zh-cn_topic_0000001149807881_p19184101242511"></a>OUTPUT_DEVICES_FLAG</p>
M
mamingshuai 已提交
116
</td>
D
duangavin123 已提交
117
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p172861314213"><a name="zh-cn_topic_0000001149807881_p172861314213"></a><a name="zh-cn_topic_0000001149807881_p172861314213"></a>1</p>
M
mamingshuai 已提交
118
</td>
D
duangavin123 已提交
119
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p5286133134212"><a name="zh-cn_topic_0000001149807881_p5286133134212"></a><a name="zh-cn_topic_0000001149807881_p5286133134212"></a>表示输出设备种类。</p>
M
mamingshuai 已提交
120 121
</td>
</tr>
D
duangavin123 已提交
122
<tr id="zh-cn_topic_0000001149807881_row2286163194220"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p5514162412251"><a name="zh-cn_topic_0000001149807881_p5514162412251"></a><a name="zh-cn_topic_0000001149807881_p5514162412251"></a>INPUT_DEVICES_FLAG</p>
M
mamingshuai 已提交
123
</td>
D
duangavin123 已提交
124
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p112863354219"><a name="zh-cn_topic_0000001149807881_p112863354219"></a><a name="zh-cn_topic_0000001149807881_p112863354219"></a>2</p>
M
mamingshuai 已提交
125
</td>
D
duangavin123 已提交
126
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p1328617334214"><a name="zh-cn_topic_0000001149807881_p1328617334214"></a><a name="zh-cn_topic_0000001149807881_p1328617334214"></a>表示输入设备种类。</p>
M
mamingshuai 已提交
127 128
</td>
</tr>
D
duangavin123 已提交
129
<tr id="zh-cn_topic_0000001149807881_row10631228192520"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p1731716317259"><a name="zh-cn_topic_0000001149807881_p1731716317259"></a><a name="zh-cn_topic_0000001149807881_p1731716317259"></a>ALL_DEVICES_FLAG</p>
M
mamingshuai 已提交
130
</td>
D
duangavin123 已提交
131
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p1364628102517"><a name="zh-cn_topic_0000001149807881_p1364628102517"></a><a name="zh-cn_topic_0000001149807881_p1364628102517"></a>3</p>
M
mamingshuai 已提交
132
</td>
D
duangavin123 已提交
133
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p1864182814256"><a name="zh-cn_topic_0000001149807881_p1864182814256"></a><a name="zh-cn_topic_0000001149807881_p1864182814256"></a>表示所有设备种类。</p>
M
mamingshuai 已提交
134 135 136 137 138
</td>
</tr>
</tbody>
</table>

D
duangavin123 已提交
139
## DeviceRole<a name="zh-cn_topic_0000001149807881_section380038142619"></a>
M
mamingshuai 已提交
140

D
duangavin123 已提交
141
设备角色。
M
mamingshuai 已提交
142

D
duangavin123 已提交
143 144
<a name="zh-cn_topic_0000001149807881_table48001786268"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row138007814267"><th class="cellrowborder" valign="top" width="30.380000000000003%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0000001149807881_p1980068112616"><a name="zh-cn_topic_0000001149807881_p1980068112616"></a><a name="zh-cn_topic_0000001149807881_p1980068112616"></a>名称</p>
M
mamingshuai 已提交
145
</th>
D
duangavin123 已提交
146
<th class="cellrowborder" valign="top" width="9.950000000000001%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0000001149807881_p28003819263"><a name="zh-cn_topic_0000001149807881_p28003819263"></a><a name="zh-cn_topic_0000001149807881_p28003819263"></a>默认值</p>
M
mamingshuai 已提交
147
</th>
D
duangavin123 已提交
148
<th class="cellrowborder" valign="top" width="59.67%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0000001149807881_p3800118112615"><a name="zh-cn_topic_0000001149807881_p3800118112615"></a><a name="zh-cn_topic_0000001149807881_p3800118112615"></a>描述</p>
M
mamingshuai 已提交
149 150 151
</th>
</tr>
</thead>
D
duangavin123 已提交
152
<tbody><tr id="zh-cn_topic_0000001149807881_row98008816264"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p1542334211265"><a name="zh-cn_topic_0000001149807881_p1542334211265"></a><a name="zh-cn_topic_0000001149807881_p1542334211265"></a>INPUT_DEVICE</p>
M
mamingshuai 已提交
153
</td>
D
duangavin123 已提交
154
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p98008852610"><a name="zh-cn_topic_0000001149807881_p98008852610"></a><a name="zh-cn_topic_0000001149807881_p98008852610"></a>1</p>
M
mamingshuai 已提交
155
</td>
D
duangavin123 已提交
156
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p118009817260"><a name="zh-cn_topic_0000001149807881_p118009817260"></a><a name="zh-cn_topic_0000001149807881_p118009817260"></a>输入设备角色。</p>
M
mamingshuai 已提交
157 158
</td>
</tr>
D
duangavin123 已提交
159
<tr id="zh-cn_topic_0000001149807881_row680018802618"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p2011710479267"><a name="zh-cn_topic_0000001149807881_p2011710479267"></a><a name="zh-cn_topic_0000001149807881_p2011710479267"></a>OUTPUT_DEVICE</p>
M
mamingshuai 已提交
160
</td>
D
duangavin123 已提交
161
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p08009812613"><a name="zh-cn_topic_0000001149807881_p08009812613"></a><a name="zh-cn_topic_0000001149807881_p08009812613"></a>2</p>
M
mamingshuai 已提交
162
</td>
D
duangavin123 已提交
163
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p380020842611"><a name="zh-cn_topic_0000001149807881_p380020842611"></a><a name="zh-cn_topic_0000001149807881_p380020842611"></a>输出设备角色。</p>
M
mamingshuai 已提交
164 165 166 167 168
</td>
</tr>
</tbody>
</table>

D
duangavin123 已提交
169
## DeviceType<a name="zh-cn_topic_0000001149807881_section11727420122710"></a>
M
mamingshuai 已提交
170

D
duangavin123 已提交
171
设备类型。
M
mamingshuai 已提交
172

D
duangavin123 已提交
173 174
<a name="zh-cn_topic_0000001149807881_table67271020132718"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row4727122012711"><th class="cellrowborder" valign="top" width="30.380000000000003%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0000001149807881_p157271520152715"><a name="zh-cn_topic_0000001149807881_p157271520152715"></a><a name="zh-cn_topic_0000001149807881_p157271520152715"></a>名称</p>
M
mamingshuai 已提交
175
</th>
D
duangavin123 已提交
176
<th class="cellrowborder" valign="top" width="9.950000000000001%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0000001149807881_p187271620152719"><a name="zh-cn_topic_0000001149807881_p187271620152719"></a><a name="zh-cn_topic_0000001149807881_p187271620152719"></a>默认值</p>
M
mamingshuai 已提交
177
</th>
D
duangavin123 已提交
178
<th class="cellrowborder" valign="top" width="59.67%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0000001149807881_p772720201277"><a name="zh-cn_topic_0000001149807881_p772720201277"></a><a name="zh-cn_topic_0000001149807881_p772720201277"></a>描述</p>
M
mamingshuai 已提交
179 180 181
</th>
</tr>
</thead>
D
duangavin123 已提交
182
<tbody><tr id="zh-cn_topic_0000001149807881_row572714205272"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p1895057192713"><a name="zh-cn_topic_0000001149807881_p1895057192713"></a><a name="zh-cn_topic_0000001149807881_p1895057192713"></a>INVALID</p>
M
mamingshuai 已提交
183
</td>
D
duangavin123 已提交
184
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p772892012273"><a name="zh-cn_topic_0000001149807881_p772892012273"></a><a name="zh-cn_topic_0000001149807881_p772892012273"></a>0</p>
M
mamingshuai 已提交
185
</td>
D
duangavin123 已提交
186
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p137281920172712"><a name="zh-cn_topic_0000001149807881_p137281920172712"></a><a name="zh-cn_topic_0000001149807881_p137281920172712"></a>无效设备。</p>
M
mamingshuai 已提交
187 188
</td>
</tr>
D
duangavin123 已提交
189
<tr id="zh-cn_topic_0000001149807881_row16728520192714"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p4753161132815"><a name="zh-cn_topic_0000001149807881_p4753161132815"></a><a name="zh-cn_topic_0000001149807881_p4753161132815"></a>SPEAKER</p>
M
mamingshuai 已提交
190
</td>
D
duangavin123 已提交
191
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p3728920162713"><a name="zh-cn_topic_0000001149807881_p3728920162713"></a><a name="zh-cn_topic_0000001149807881_p3728920162713"></a>1</p>
M
mamingshuai 已提交
192
</td>
D
duangavin123 已提交
193
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p17728112062715"><a name="zh-cn_topic_0000001149807881_p17728112062715"></a><a name="zh-cn_topic_0000001149807881_p17728112062715"></a>扬声器。</p>
M
mamingshuai 已提交
194 195
</td>
</tr>
D
duangavin123 已提交
196
<tr id="zh-cn_topic_0000001149807881_row1758117472814"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p74802011112815"><a name="zh-cn_topic_0000001149807881_p74802011112815"></a><a name="zh-cn_topic_0000001149807881_p74802011112815"></a>WIRED_HEADSET</p>
M
mamingshuai 已提交
197
</td>
D
duangavin123 已提交
198
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p35820462819"><a name="zh-cn_topic_0000001149807881_p35820462819"></a><a name="zh-cn_topic_0000001149807881_p35820462819"></a>2</p>
M
mamingshuai 已提交
199
</td>
D
duangavin123 已提交
200
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p155821548285"><a name="zh-cn_topic_0000001149807881_p155821548285"></a><a name="zh-cn_topic_0000001149807881_p155821548285"></a>有线耳机。</p>
M
mamingshuai 已提交
201 202
</td>
</tr>
D
duangavin123 已提交
203
<tr id="zh-cn_topic_0000001149807881_row1335108192818"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p107521514142811"><a name="zh-cn_topic_0000001149807881_p107521514142811"></a><a name="zh-cn_topic_0000001149807881_p107521514142811"></a>BLUETOOTH_SCO</p>
M
mamingshuai 已提交
204
</td>
D
duangavin123 已提交
205
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p18335108112819"><a name="zh-cn_topic_0000001149807881_p18335108112819"></a><a name="zh-cn_topic_0000001149807881_p18335108112819"></a>3</p>
M
mamingshuai 已提交
206
</td>
D
duangavin123 已提交
207
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p193351683289"><a name="zh-cn_topic_0000001149807881_p193351683289"></a><a name="zh-cn_topic_0000001149807881_p193351683289"></a>SCO(Synchronous Connection Oriented Link)蓝牙设备。</p>
M
mamingshuai 已提交
208 209
</td>
</tr>
D
duangavin123 已提交
210
<tr id="zh-cn_topic_0000001149807881_row1649111617286"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p10784017102818"><a name="zh-cn_topic_0000001149807881_p10784017102818"></a><a name="zh-cn_topic_0000001149807881_p10784017102818"></a>BLUETOOTH_A2DP</p>
M
mamingshuai 已提交
211
</td>
D
duangavin123 已提交
212
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p849110610286"><a name="zh-cn_topic_0000001149807881_p849110610286"></a><a name="zh-cn_topic_0000001149807881_p849110610286"></a>4</p>
M
mamingshuai 已提交
213
</td>
D
duangavin123 已提交
214
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p549117620284"><a name="zh-cn_topic_0000001149807881_p549117620284"></a><a name="zh-cn_topic_0000001149807881_p549117620284"></a>A2DP(Advanced Audio Distribution Profile )蓝牙设备。</p>
M
mamingshuai 已提交
215 216
</td>
</tr>
D
duangavin123 已提交
217
<tr id="zh-cn_topic_0000001149807881_row81701220112812"><td class="cellrowborder" valign="top" width="30.380000000000003%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149807881_p168642028152812"><a name="zh-cn_topic_0000001149807881_p168642028152812"></a><a name="zh-cn_topic_0000001149807881_p168642028152812"></a>MIC</p>
M
mamingshuai 已提交
218
</td>
D
duangavin123 已提交
219
<td class="cellrowborder" valign="top" width="9.950000000000001%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149807881_p517062012812"><a name="zh-cn_topic_0000001149807881_p517062012812"></a><a name="zh-cn_topic_0000001149807881_p517062012812"></a>5</p>
M
mamingshuai 已提交
220
</td>
D
duangavin123 已提交
221
<td class="cellrowborder" valign="top" width="59.67%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149807881_p5170520112813"><a name="zh-cn_topic_0000001149807881_p5170520112813"></a><a name="zh-cn_topic_0000001149807881_p5170520112813"></a>麦克风。</p>
M
mamingshuai 已提交
222 223 224 225 226
</td>
</tr>
</tbody>
</table>

D
duangavin123 已提交
227
## 附录<a name="zh-cn_topic_0000001149807881_section1933416317165"></a>
M
mamingshuai 已提交
228

D
duangavin123 已提交
229
## AudioManager<a name="zh-cn_topic_0000001149807881_section8265143814015"></a>
M
mamingshuai 已提交
230

D
duangavin123 已提交
231
音频管理器。
M
mamingshuai 已提交
232

D
duangavin123 已提交
233
### setVolume\(AudioVolumeType, number, AsyncCallback<void\>\)<a name="zh-cn_topic_0000001149807881_section189141826104616"></a>
M
mamingshuai 已提交
234

D
duangavin123 已提交
235
设置某个流的音量,使用callback方式作为异步方法。
M
mamingshuai 已提交
236 237 238

**参数:**

D
duangavin123 已提交
239 240
<a name="zh-cn_topic_0000001149807881_table11004831415"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row1510164861414"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p171154819142"><a name="zh-cn_topic_0000001149807881_p171154819142"></a><a name="zh-cn_topic_0000001149807881_p171154819142"></a>参数名</p>
M
mamingshuai 已提交
241
</th>
D
duangavin123 已提交
242
<th class="cellrowborder" valign="top" width="19.52%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p121164815148"><a name="zh-cn_topic_0000001149807881_p121164815148"></a><a name="zh-cn_topic_0000001149807881_p121164815148"></a>类型</p>
M
mamingshuai 已提交
243
</th>
D
duangavin123 已提交
244
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p1351547105313"><a name="zh-cn_topic_0000001149807881_p1351547105313"></a><a name="zh-cn_topic_0000001149807881_p1351547105313"></a>必填</p>
M
mamingshuai 已提交
245
</th>
D
duangavin123 已提交
246
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p131114812144"><a name="zh-cn_topic_0000001149807881_p131114812144"></a><a name="zh-cn_topic_0000001149807881_p131114812144"></a>说明</p>
M
mamingshuai 已提交
247 248 249
</th>
</tr>
</thead>
D
duangavin123 已提交
250
<tbody><tr id="zh-cn_topic_0000001149807881_row911124881410"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p11184811420"><a name="zh-cn_topic_0000001149807881_p11184811420"></a><a name="zh-cn_topic_0000001149807881_p11184811420"></a>audioType</p>
M
mamingshuai 已提交
251
</td>
D
duangavin123 已提交
252
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p91134810142"><a name="zh-cn_topic_0000001149807881_p91134810142"></a><a name="zh-cn_topic_0000001149807881_p91134810142"></a><a href="#zh-cn_topic_0000001149807881_section92261857172218">AudioVolumeType</a></p>
M
mamingshuai 已提交
253
</td>
D
duangavin123 已提交
254
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p1751247115312"><a name="zh-cn_topic_0000001149807881_p1751247115312"></a><a name="zh-cn_topic_0000001149807881_p1751247115312"></a></p>
M
mamingshuai 已提交
255
</td>
D
duangavin123 已提交
256
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p151134811149"><a name="zh-cn_topic_0000001149807881_p151134811149"></a><a name="zh-cn_topic_0000001149807881_p151134811149"></a>流类型。</p>
M
mamingshuai 已提交
257 258
</td>
</tr>
D
duangavin123 已提交
259
<tr id="zh-cn_topic_0000001149807881_row1811164871417"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p141114817144"><a name="zh-cn_topic_0000001149807881_p141114817144"></a><a name="zh-cn_topic_0000001149807881_p141114817144"></a>volume</p>
M
mamingshuai 已提交
260
</td>
D
duangavin123 已提交
261
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p1511648151417"><a name="zh-cn_topic_0000001149807881_p1511648151417"></a><a name="zh-cn_topic_0000001149807881_p1511648151417"></a>number</p>
M
mamingshuai 已提交
262
</td>
D
duangavin123 已提交
263
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p151947175314"><a name="zh-cn_topic_0000001149807881_p151947175314"></a><a name="zh-cn_topic_0000001149807881_p151947175314"></a></p>
M
mamingshuai 已提交
264
</td>
D
duangavin123 已提交
265
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p16111548121411"><a name="zh-cn_topic_0000001149807881_p16111548121411"></a><a name="zh-cn_topic_0000001149807881_p16111548121411"></a>音量。</p>
M
mamingshuai 已提交
266 267
</td>
</tr>
D
duangavin123 已提交
268
<tr id="zh-cn_topic_0000001149807881_row85121563158"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p175121965154"><a name="zh-cn_topic_0000001149807881_p175121965154"></a><a name="zh-cn_topic_0000001149807881_p175121965154"></a>callback</p>
M
mamingshuai 已提交
269
</td>
D
duangavin123 已提交
270
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p1851220691518"><a name="zh-cn_topic_0000001149807881_p1851220691518"></a><a name="zh-cn_topic_0000001149807881_p1851220691518"></a>AsyncCallback&lt;void&gt;</p>
M
mamingshuai 已提交
271
</td>
D
duangavin123 已提交
272
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p15134711532"><a name="zh-cn_topic_0000001149807881_p15134711532"></a><a name="zh-cn_topic_0000001149807881_p15134711532"></a></p>
M
mamingshuai 已提交
273
</td>
D
duangavin123 已提交
274
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p751211651512"><a name="zh-cn_topic_0000001149807881_p751211651512"></a><a name="zh-cn_topic_0000001149807881_p751211651512"></a>回调表示成功还是失败。</p>
M
mamingshuai 已提交
275 276 277 278 279 280 281 282
</td>
</tr>
</tbody>
</table>

**示例:**

```
D
duangavin123 已提交
283
audioManager.setVolume(audio.AudioVolumeType.MEDIA, 30, (err)=>{
M
mamingshuai 已提交
284
   if (err) {
D
duangavin123 已提交
285
	   console.error(`failed to set volume ${err.message}`);
M
mamingshuai 已提交
286 287
	   return;
   }
D
duangavin123 已提交
288
   console.log(`Media setVolume successful callback`);
M
mamingshuai 已提交
289 290 291
})
```

D
duangavin123 已提交
292
### setVolume\(AudioVolumeType, number\)<a name="zh-cn_topic_0000001149807881_section102021249114612"></a>
M
mamingshuai 已提交
293

D
duangavin123 已提交
294
设置某个流的音量,使用promise方式作为异步方法。
M
mamingshuai 已提交
295 296 297

**参数:**

D
duangavin123 已提交
298 299
<a name="zh-cn_topic_0000001149807881_table20688181818176"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row1368810188176"><th class="cellrowborder" valign="top" width="17.599999999999998%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p5688818171712"><a name="zh-cn_topic_0000001149807881_p5688818171712"></a><a name="zh-cn_topic_0000001149807881_p5688818171712"></a>参数名</p>
M
mamingshuai 已提交
300
</th>
D
duangavin123 已提交
301
<th class="cellrowborder" valign="top" width="19.49%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p8688118111719"><a name="zh-cn_topic_0000001149807881_p8688118111719"></a><a name="zh-cn_topic_0000001149807881_p8688118111719"></a>类型</p>
M
mamingshuai 已提交
302
</th>
D
duangavin123 已提交
303
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p1994792215711"><a name="zh-cn_topic_0000001149807881_p1994792215711"></a><a name="zh-cn_topic_0000001149807881_p1994792215711"></a>必填</p>
M
mamingshuai 已提交
304
</th>
D
duangavin123 已提交
305
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p12688151816173"><a name="zh-cn_topic_0000001149807881_p12688151816173"></a><a name="zh-cn_topic_0000001149807881_p12688151816173"></a>说明</p>
M
mamingshuai 已提交
306 307 308
</th>
</tr>
</thead>
D
duangavin123 已提交
309
<tbody><tr id="zh-cn_topic_0000001149807881_row0688518171714"><td class="cellrowborder" valign="top" width="17.599999999999998%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p1368820182174"><a name="zh-cn_topic_0000001149807881_p1368820182174"></a><a name="zh-cn_topic_0000001149807881_p1368820182174"></a>audioType</p>
M
mamingshuai 已提交
310
</td>
D
duangavin123 已提交
311
<td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p116881518111712"><a name="zh-cn_topic_0000001149807881_p116881518111712"></a><a name="zh-cn_topic_0000001149807881_p116881518111712"></a><a href="#zh-cn_topic_0000001149807881_section92261857172218">AudioVolumeType</a></p>
M
mamingshuai 已提交
312
</td>
D
duangavin123 已提交
313
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p2094702218579"><a name="zh-cn_topic_0000001149807881_p2094702218579"></a><a name="zh-cn_topic_0000001149807881_p2094702218579"></a></p>
M
mamingshuai 已提交
314
</td>
D
duangavin123 已提交
315
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p1688131812176"><a name="zh-cn_topic_0000001149807881_p1688131812176"></a><a name="zh-cn_topic_0000001149807881_p1688131812176"></a>流类型。</p>
M
mamingshuai 已提交
316 317
</td>
</tr>
D
duangavin123 已提交
318
<tr id="zh-cn_topic_0000001149807881_row5688218131711"><td class="cellrowborder" valign="top" width="17.599999999999998%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p176881618181715"><a name="zh-cn_topic_0000001149807881_p176881618181715"></a><a name="zh-cn_topic_0000001149807881_p176881618181715"></a>volume</p>
M
mamingshuai 已提交
319
</td>
D
duangavin123 已提交
320
<td class="cellrowborder" valign="top" width="19.49%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p5688201811720"><a name="zh-cn_topic_0000001149807881_p5688201811720"></a><a name="zh-cn_topic_0000001149807881_p5688201811720"></a>number</p>
M
mamingshuai 已提交
321
</td>
D
duangavin123 已提交
322
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p79472226579"><a name="zh-cn_topic_0000001149807881_p79472226579"></a><a name="zh-cn_topic_0000001149807881_p79472226579"></a></p>
M
mamingshuai 已提交
323
</td>
D
duangavin123 已提交
324
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p2688718171716"><a name="zh-cn_topic_0000001149807881_p2688718171716"></a><a name="zh-cn_topic_0000001149807881_p2688718171716"></a>音量。</p>
M
mamingshuai 已提交
325 326 327 328 329 330 331
</td>
</tr>
</tbody>
</table>

**返回值:**

D
duangavin123 已提交
332 333
<a name="zh-cn_topic_0000001149807881_table106721328171713"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row9672122817176"><th class="cellrowborder" valign="top" width="26.06%" id="mcps1.1.3.1.1"><p id="zh-cn_topic_0000001149807881_p106728288171"><a name="zh-cn_topic_0000001149807881_p106728288171"></a><a name="zh-cn_topic_0000001149807881_p106728288171"></a>类型</p>
M
mamingshuai 已提交
334
</th>
D
duangavin123 已提交
335
<th class="cellrowborder" valign="top" width="73.94%" id="mcps1.1.3.1.2"><p id="zh-cn_topic_0000001149807881_p5672112817178"><a name="zh-cn_topic_0000001149807881_p5672112817178"></a><a name="zh-cn_topic_0000001149807881_p5672112817178"></a>说明</p>
M
mamingshuai 已提交
336 337 338
</th>
</tr>
</thead>
D
duangavin123 已提交
339
<tbody><tr id="zh-cn_topic_0000001149807881_row06721528191711"><td class="cellrowborder" valign="top" width="26.06%" headers="mcps1.1.3.1.1 "><p id="zh-cn_topic_0000001149807881_p107821612171919"><a name="zh-cn_topic_0000001149807881_p107821612171919"></a><a name="zh-cn_topic_0000001149807881_p107821612171919"></a>Promise&lt;void&gt;</p>
M
mamingshuai 已提交
340
</td>
D
duangavin123 已提交
341
<td class="cellrowborder" valign="top" width="73.94%" headers="mcps1.1.3.1.2 "><p id="zh-cn_topic_0000001149807881_p4672828141718"><a name="zh-cn_topic_0000001149807881_p4672828141718"></a><a name="zh-cn_topic_0000001149807881_p4672828141718"></a>Promise回调表示成功还是失败。</p>
M
mamingshuai 已提交
342 343 344 345 346 347 348 349
</td>
</tr>
</tbody>
</table>

**示例:**

```
D
duangavin123 已提交
350 351
audioManager.setVolume(audio.AudioVolumeType.MEDIA, 30).then(()=>
    console.log(`Media setVolume successful callback`);
M
mamingshuai 已提交
352 353 354
)
```

D
duangavin123 已提交
355
### getVolume\(AudioVolumeType, AsyncCallback<number\>\)<a name="zh-cn_topic_0000001149807881_section4387320194714"></a>
M
mamingshuai 已提交
356

D
duangavin123 已提交
357
获取某个流的音量,使用callback方式作为异步方法。
M
mamingshuai 已提交
358 359 360

**参数:**

D
duangavin123 已提交
361 362
<a name="zh-cn_topic_0000001149807881_table44323134204"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row16433171322017"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p1943319132201"><a name="zh-cn_topic_0000001149807881_p1943319132201"></a><a name="zh-cn_topic_0000001149807881_p1943319132201"></a>参数名</p>
M
mamingshuai 已提交
363
</th>
D
duangavin123 已提交
364
<th class="cellrowborder" valign="top" width="19.52%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p143314139203"><a name="zh-cn_topic_0000001149807881_p143314139203"></a><a name="zh-cn_topic_0000001149807881_p143314139203"></a>类型</p>
M
mamingshuai 已提交
365
</th>
D
duangavin123 已提交
366
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p1540765014581"><a name="zh-cn_topic_0000001149807881_p1540765014581"></a><a name="zh-cn_topic_0000001149807881_p1540765014581"></a>必填</p>
M
mamingshuai 已提交
367
</th>
D
duangavin123 已提交
368
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p10433181362011"><a name="zh-cn_topic_0000001149807881_p10433181362011"></a><a name="zh-cn_topic_0000001149807881_p10433181362011"></a>说明</p>
M
mamingshuai 已提交
369 370 371
</th>
</tr>
</thead>
D
duangavin123 已提交
372
<tbody><tr id="zh-cn_topic_0000001149807881_row4433913122010"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p54331513192018"><a name="zh-cn_topic_0000001149807881_p54331513192018"></a><a name="zh-cn_topic_0000001149807881_p54331513192018"></a>audioType</p>
M
mamingshuai 已提交
373
</td>
D
duangavin123 已提交
374
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p182075544714"><a name="zh-cn_topic_0000001149807881_p182075544714"></a><a name="zh-cn_topic_0000001149807881_p182075544714"></a><a href="#zh-cn_topic_0000001149807881_section92261857172218">AudioVolumeType</a></p>
M
mamingshuai 已提交
375
</td>
D
duangavin123 已提交
376
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p3407185013588"><a name="zh-cn_topic_0000001149807881_p3407185013588"></a><a name="zh-cn_topic_0000001149807881_p3407185013588"></a></p>
M
mamingshuai 已提交
377
</td>
D
duangavin123 已提交
378
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p44331613142018"><a name="zh-cn_topic_0000001149807881_p44331613142018"></a><a name="zh-cn_topic_0000001149807881_p44331613142018"></a>流类型。</p>
M
mamingshuai 已提交
379 380
</td>
</tr>
D
duangavin123 已提交
381
<tr id="zh-cn_topic_0000001149807881_row743331372014"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p143341319205"><a name="zh-cn_topic_0000001149807881_p143341319205"></a><a name="zh-cn_topic_0000001149807881_p143341319205"></a>callback</p>
M
mamingshuai 已提交
382
</td>
D
duangavin123 已提交
383
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p1043316137200"><a name="zh-cn_topic_0000001149807881_p1043316137200"></a><a name="zh-cn_topic_0000001149807881_p1043316137200"></a>AsyncCallback&lt;number&gt;</p>
M
mamingshuai 已提交
384
</td>
D
duangavin123 已提交
385
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p12659352195818"><a name="zh-cn_topic_0000001149807881_p12659352195818"></a><a name="zh-cn_topic_0000001149807881_p12659352195818"></a></p>
M
mamingshuai 已提交
386
</td>
D
duangavin123 已提交
387
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p3433161313204"><a name="zh-cn_topic_0000001149807881_p3433161313204"></a><a name="zh-cn_topic_0000001149807881_p3433161313204"></a>回调返回音量大小。</p>
M
mamingshuai 已提交
388 389 390 391 392 393 394 395
</td>
</tr>
</tbody>
</table>

**示例:**

```
D
duangavin123 已提交
396
audioManager.getVolume(audio.AudioVolumeType.MEDIA, (err, value)=>{
M
mamingshuai 已提交
397
   if (err) {
D
duangavin123 已提交
398
	   console.error(`failed to get volume ${err.message}`);
M
mamingshuai 已提交
399 400
	   return;
   }
D
duangavin123 已提交
401
   console.log(`Media getVolume successful callback`);
M
mamingshuai 已提交
402 403 404
})
```

D
duangavin123 已提交
405
### getVolume\(AudioVolumeType\)<a name="zh-cn_topic_0000001149807881_section04121965119"></a>
M
mamingshuai 已提交
406

D
duangavin123 已提交
407
获取某个流的音量,使用promise方式作为异步方法。
M
mamingshuai 已提交
408 409 410

**参数:**

D
duangavin123 已提交
411 412
<a name="zh-cn_topic_0000001149807881_table174341113202016"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row843416136203"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p143410134207"><a name="zh-cn_topic_0000001149807881_p143410134207"></a><a name="zh-cn_topic_0000001149807881_p143410134207"></a>参数名</p>
M
mamingshuai 已提交
413
</th>
D
duangavin123 已提交
414
<th class="cellrowborder" valign="top" width="19.52%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p6434813182016"><a name="zh-cn_topic_0000001149807881_p6434813182016"></a><a name="zh-cn_topic_0000001149807881_p6434813182016"></a>类型</p>
M
mamingshuai 已提交
415
</th>
D
duangavin123 已提交
416
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p418721165918"><a name="zh-cn_topic_0000001149807881_p418721165918"></a><a name="zh-cn_topic_0000001149807881_p418721165918"></a>必填</p>
M
mamingshuai 已提交
417
</th>
D
duangavin123 已提交
418
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p943491320207"><a name="zh-cn_topic_0000001149807881_p943491320207"></a><a name="zh-cn_topic_0000001149807881_p943491320207"></a>说明</p>
M
mamingshuai 已提交
419 420 421
</th>
</tr>
</thead>
D
duangavin123 已提交
422
<tbody><tr id="zh-cn_topic_0000001149807881_row5434181312207"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p144343134206"><a name="zh-cn_topic_0000001149807881_p144343134206"></a><a name="zh-cn_topic_0000001149807881_p144343134206"></a>audioType</p>
M
mamingshuai 已提交
423
</td>
D
duangavin123 已提交
424
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p121741711487"><a name="zh-cn_topic_0000001149807881_p121741711487"></a><a name="zh-cn_topic_0000001149807881_p121741711487"></a><a href="#zh-cn_topic_0000001149807881_section92261857172218">AudioVolumeType</a></p>
M
mamingshuai 已提交
425
</td>
D
duangavin123 已提交
426
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p118791205914"><a name="zh-cn_topic_0000001149807881_p118791205914"></a><a name="zh-cn_topic_0000001149807881_p118791205914"></a></p>
M
mamingshuai 已提交
427
</td>
D
duangavin123 已提交
428
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p6434613122010"><a name="zh-cn_topic_0000001149807881_p6434613122010"></a><a name="zh-cn_topic_0000001149807881_p6434613122010"></a>流类型。</p>
M
mamingshuai 已提交
429 430 431 432 433 434 435
</td>
</tr>
</tbody>
</table>

**返回值:**

D
duangavin123 已提交
436 437
<a name="zh-cn_topic_0000001149807881_table11435101313201"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row9435191332013"><th class="cellrowborder" valign="top" width="25.97%" id="mcps1.1.3.1.1"><p id="zh-cn_topic_0000001149807881_p7435131352019"><a name="zh-cn_topic_0000001149807881_p7435131352019"></a><a name="zh-cn_topic_0000001149807881_p7435131352019"></a>类型</p>
M
mamingshuai 已提交
438
</th>
D
duangavin123 已提交
439
<th class="cellrowborder" valign="top" width="74.03%" id="mcps1.1.3.1.2"><p id="zh-cn_topic_0000001149807881_p343521362017"><a name="zh-cn_topic_0000001149807881_p343521362017"></a><a name="zh-cn_topic_0000001149807881_p343521362017"></a>说明</p>
M
mamingshuai 已提交
440 441 442
</th>
</tr>
</thead>
D
duangavin123 已提交
443
<tbody><tr id="zh-cn_topic_0000001149807881_row1143515137209"><td class="cellrowborder" valign="top" width="25.97%" headers="mcps1.1.3.1.1 "><p id="zh-cn_topic_0000001149807881_p3435171318201"><a name="zh-cn_topic_0000001149807881_p3435171318201"></a><a name="zh-cn_topic_0000001149807881_p3435171318201"></a>Promise&lt;number&gt;</p>
M
mamingshuai 已提交
444
</td>
D
duangavin123 已提交
445
<td class="cellrowborder" valign="top" width="74.03%" headers="mcps1.1.3.1.2 "><p id="zh-cn_topic_0000001149807881_p17435513102016"><a name="zh-cn_topic_0000001149807881_p17435513102016"></a><a name="zh-cn_topic_0000001149807881_p17435513102016"></a>Promise回调返回音量大小。</p>
M
mamingshuai 已提交
446 447 448 449 450 451 452 453
</td>
</tr>
</tbody>
</table>

**示例:**

```
D
duangavin123 已提交
454 455
audioManager.getVolume(audio.AudioVolumeType.MEDIA).then((data)=>
    console.log(`Media getVolume successful callback`);
M
mamingshuai 已提交
456 457 458
)
```

D
duangavin123 已提交
459
### getMinVolume\(AudioVolumeType, AsyncCallback<number\>\)<a name="zh-cn_topic_0000001149807881_section188714283511"></a>
M
mamingshuai 已提交
460

D
duangavin123 已提交
461
获取某个流的最小音量,使用callback方式作为异步方法。
M
mamingshuai 已提交
462 463 464

**参数:**

D
duangavin123 已提交
465 466
<a name="zh-cn_topic_0000001149807881_table9585157122219"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row95857713228"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p1358510710223"><a name="zh-cn_topic_0000001149807881_p1358510710223"></a><a name="zh-cn_topic_0000001149807881_p1358510710223"></a>参数名</p>
M
mamingshuai 已提交
467
</th>
D
duangavin123 已提交
468
<th class="cellrowborder" valign="top" width="19.52%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p958577152214"><a name="zh-cn_topic_0000001149807881_p958577152214"></a><a name="zh-cn_topic_0000001149807881_p958577152214"></a>类型</p>
M
mamingshuai 已提交
469
</th>
D
duangavin123 已提交
470
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p12979171810590"><a name="zh-cn_topic_0000001149807881_p12979171810590"></a><a name="zh-cn_topic_0000001149807881_p12979171810590"></a>必填</p>
M
mamingshuai 已提交
471
</th>
D
duangavin123 已提交
472
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p85851579221"><a name="zh-cn_topic_0000001149807881_p85851579221"></a><a name="zh-cn_topic_0000001149807881_p85851579221"></a>说明</p>
M
mamingshuai 已提交
473 474 475
</th>
</tr>
</thead>
D
duangavin123 已提交
476
<tbody><tr id="zh-cn_topic_0000001149807881_row7585373227"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p105852712216"><a name="zh-cn_topic_0000001149807881_p105852712216"></a><a name="zh-cn_topic_0000001149807881_p105852712216"></a>audioType</p>
M
mamingshuai 已提交
477
</td>
D
duangavin123 已提交
478
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p1862714319487"><a name="zh-cn_topic_0000001149807881_p1862714319487"></a><a name="zh-cn_topic_0000001149807881_p1862714319487"></a><a href="#zh-cn_topic_0000001149807881_section92261857172218">AudioVolumeType</a></p>
M
mamingshuai 已提交
479
</td>
D
duangavin123 已提交
480
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p59791018125916"><a name="zh-cn_topic_0000001149807881_p59791018125916"></a><a name="zh-cn_topic_0000001149807881_p59791018125916"></a></p>
M
mamingshuai 已提交
481
</td>
D
duangavin123 已提交
482
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p758517710222"><a name="zh-cn_topic_0000001149807881_p758517710222"></a><a name="zh-cn_topic_0000001149807881_p758517710222"></a>流类型。</p>
M
mamingshuai 已提交
483 484
</td>
</tr>
D
duangavin123 已提交
485
<tr id="zh-cn_topic_0000001149807881_row165851718222"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p115866772214"><a name="zh-cn_topic_0000001149807881_p115866772214"></a><a name="zh-cn_topic_0000001149807881_p115866772214"></a>callback</p>
M
mamingshuai 已提交
486
</td>
D
duangavin123 已提交
487
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p558614719222"><a name="zh-cn_topic_0000001149807881_p558614719222"></a><a name="zh-cn_topic_0000001149807881_p558614719222"></a>AsyncCallback&lt;number&gt;</p>
M
mamingshuai 已提交
488
</td>
D
duangavin123 已提交
489
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p89791518185916"><a name="zh-cn_topic_0000001149807881_p89791518185916"></a><a name="zh-cn_topic_0000001149807881_p89791518185916"></a></p>
M
mamingshuai 已提交
490
</td>
D
duangavin123 已提交
491
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p1958614711221"><a name="zh-cn_topic_0000001149807881_p1958614711221"></a><a name="zh-cn_topic_0000001149807881_p1958614711221"></a>回调返回最小音量。</p>
M
mamingshuai 已提交
492 493 494 495 496 497 498 499
</td>
</tr>
</tbody>
</table>

**示例:**

```
D
duangavin123 已提交
500 501 502 503 504 505
audioManager.getMinVolume(audio.AudioVolumeType.MEDIA, (err, value)=>{
   if (err) {
	   console.error(`failed to get minvolume ${err.message}`);
	   return;
   }
   console.log(`Media getMinVolume successful callback`);
M
mamingshuai 已提交
506 507 508
})
```

D
duangavin123 已提交
509
### getMinVolume\(AudioVolumeType\)<a name="zh-cn_topic_0000001149807881_section41556389511"></a>
M
mamingshuai 已提交
510

D
duangavin123 已提交
511
获取某个流的最小音量,使用promise方式作为异步方法。
M
mamingshuai 已提交
512 513 514

**参数:**

D
duangavin123 已提交
515 516
<a name="zh-cn_topic_0000001149807881_table558627102215"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row175868714227"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p1758619712217"><a name="zh-cn_topic_0000001149807881_p1758619712217"></a><a name="zh-cn_topic_0000001149807881_p1758619712217"></a>参数名</p>
M
mamingshuai 已提交
517
</th>
D
duangavin123 已提交
518
<th class="cellrowborder" valign="top" width="19.52%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p12586776227"><a name="zh-cn_topic_0000001149807881_p12586776227"></a><a name="zh-cn_topic_0000001149807881_p12586776227"></a>类型</p>
M
mamingshuai 已提交
519
</th>
D
duangavin123 已提交
520
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p94861627165914"><a name="zh-cn_topic_0000001149807881_p94861627165914"></a><a name="zh-cn_topic_0000001149807881_p94861627165914"></a>必填</p>
M
mamingshuai 已提交
521
</th>
D
duangavin123 已提交
522
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p85862711223"><a name="zh-cn_topic_0000001149807881_p85862711223"></a><a name="zh-cn_topic_0000001149807881_p85862711223"></a>说明</p>
M
mamingshuai 已提交
523 524 525
</th>
</tr>
</thead>
D
duangavin123 已提交
526
<tbody><tr id="zh-cn_topic_0000001149807881_row65861477221"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p5586167172217"><a name="zh-cn_topic_0000001149807881_p5586167172217"></a><a name="zh-cn_topic_0000001149807881_p5586167172217"></a>audioType</p>
M
mamingshuai 已提交
527
</td>
D
duangavin123 已提交
528
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p592519511485"><a name="zh-cn_topic_0000001149807881_p592519511485"></a><a name="zh-cn_topic_0000001149807881_p592519511485"></a><a href="#zh-cn_topic_0000001149807881_section92261857172218">AudioVolumeType</a></p>
M
mamingshuai 已提交
529
</td>
D
duangavin123 已提交
530
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p2048622713593"><a name="zh-cn_topic_0000001149807881_p2048622713593"></a><a name="zh-cn_topic_0000001149807881_p2048622713593"></a></p>
M
mamingshuai 已提交
531
</td>
D
duangavin123 已提交
532
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p135871079226"><a name="zh-cn_topic_0000001149807881_p135871079226"></a><a name="zh-cn_topic_0000001149807881_p135871079226"></a>流类型。</p>
M
mamingshuai 已提交
533 534 535 536 537 538 539
</td>
</tr>
</tbody>
</table>

**返回值:**

D
duangavin123 已提交
540 541
<a name="zh-cn_topic_0000001149807881_table35874718223"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row1558718715227"><th class="cellrowborder" valign="top" width="26.02%" id="mcps1.1.3.1.1"><p id="zh-cn_topic_0000001149807881_p75871715226"><a name="zh-cn_topic_0000001149807881_p75871715226"></a><a name="zh-cn_topic_0000001149807881_p75871715226"></a>类型</p>
M
mamingshuai 已提交
542
</th>
D
duangavin123 已提交
543
<th class="cellrowborder" valign="top" width="73.98%" id="mcps1.1.3.1.2"><p id="zh-cn_topic_0000001149807881_p85871720225"><a name="zh-cn_topic_0000001149807881_p85871720225"></a><a name="zh-cn_topic_0000001149807881_p85871720225"></a>说明</p>
M
mamingshuai 已提交
544 545 546
</th>
</tr>
</thead>
D
duangavin123 已提交
547
<tbody><tr id="zh-cn_topic_0000001149807881_row1458710714221"><td class="cellrowborder" valign="top" width="26.02%" headers="mcps1.1.3.1.1 "><p id="zh-cn_topic_0000001149807881_p558737142218"><a name="zh-cn_topic_0000001149807881_p558737142218"></a><a name="zh-cn_topic_0000001149807881_p558737142218"></a>Promise&lt;number&gt;</p>
M
mamingshuai 已提交
548
</td>
D
duangavin123 已提交
549
<td class="cellrowborder" valign="top" width="73.98%" headers="mcps1.1.3.1.2 "><p id="zh-cn_topic_0000001149807881_p05878717229"><a name="zh-cn_topic_0000001149807881_p05878717229"></a><a name="zh-cn_topic_0000001149807881_p05878717229"></a>Promise回调返回最小音量。</p>
M
mamingshuai 已提交
550 551 552 553 554 555 556 557
</td>
</tr>
</tbody>
</table>

**示例:**

```
D
duangavin123 已提交
558 559
audioManager.getMinVolume(audio.AudioVolumeType.MEDIA).then((data)=>
    console.log(`Media getMinVolume successful callback`);
M
mamingshuai 已提交
560 561 562
)
```

D
duangavin123 已提交
563
### getMaxVolume\(AudioVolumeType, AsyncCallback<number\>\)<a name="zh-cn_topic_0000001149807881_section690395418516"></a>
M
mamingshuai 已提交
564

D
duangavin123 已提交
565
获取某个流的最大音量,使用callback方式作为异步方法。
M
mamingshuai 已提交
566 567 568

**参数:**

D
duangavin123 已提交
569 570
<a name="zh-cn_topic_0000001149807881_table7210144262214"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row7210104242215"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p521018428221"><a name="zh-cn_topic_0000001149807881_p521018428221"></a><a name="zh-cn_topic_0000001149807881_p521018428221"></a>参数名</p>
M
mamingshuai 已提交
571
</th>
D
duangavin123 已提交
572
<th class="cellrowborder" valign="top" width="19.52%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p102107424223"><a name="zh-cn_topic_0000001149807881_p102107424223"></a><a name="zh-cn_topic_0000001149807881_p102107424223"></a>类型</p>
M
mamingshuai 已提交
573
</th>
D
duangavin123 已提交
574
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p167531439593"><a name="zh-cn_topic_0000001149807881_p167531439593"></a><a name="zh-cn_topic_0000001149807881_p167531439593"></a>必填</p>
M
mamingshuai 已提交
575
</th>
D
duangavin123 已提交
576
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p1521054292218"><a name="zh-cn_topic_0000001149807881_p1521054292218"></a><a name="zh-cn_topic_0000001149807881_p1521054292218"></a>说明</p>
M
mamingshuai 已提交
577 578 579
</th>
</tr>
</thead>
D
duangavin123 已提交
580
<tbody><tr id="zh-cn_topic_0000001149807881_row321010428228"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p5210642132212"><a name="zh-cn_topic_0000001149807881_p5210642132212"></a><a name="zh-cn_topic_0000001149807881_p5210642132212"></a>audioType</p>
M
mamingshuai 已提交
581
</td>
D
duangavin123 已提交
582
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p35691288487"><a name="zh-cn_topic_0000001149807881_p35691288487"></a><a name="zh-cn_topic_0000001149807881_p35691288487"></a><a href="#zh-cn_topic_0000001149807881_section92261857172218">AudioVolumeType</a></p>
M
mamingshuai 已提交
583
</td>
D
duangavin123 已提交
584
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p14753114317590"><a name="zh-cn_topic_0000001149807881_p14753114317590"></a><a name="zh-cn_topic_0000001149807881_p14753114317590"></a></p>
M
mamingshuai 已提交
585
</td>
D
duangavin123 已提交
586
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p8210242112217"><a name="zh-cn_topic_0000001149807881_p8210242112217"></a><a name="zh-cn_topic_0000001149807881_p8210242112217"></a>流类型。</p>
M
mamingshuai 已提交
587 588
</td>
</tr>
D
duangavin123 已提交
589
<tr id="zh-cn_topic_0000001149807881_row82115429227"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p4211842132218"><a name="zh-cn_topic_0000001149807881_p4211842132218"></a><a name="zh-cn_topic_0000001149807881_p4211842132218"></a>callback</p>
M
mamingshuai 已提交
590
</td>
D
duangavin123 已提交
591
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p8211114232217"><a name="zh-cn_topic_0000001149807881_p8211114232217"></a><a name="zh-cn_topic_0000001149807881_p8211114232217"></a>AsyncCallback&lt;number&gt;</p>
M
mamingshuai 已提交
592
</td>
D
duangavin123 已提交
593
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p1275384315910"><a name="zh-cn_topic_0000001149807881_p1275384315910"></a><a name="zh-cn_topic_0000001149807881_p1275384315910"></a></p>
M
mamingshuai 已提交
594
</td>
D
duangavin123 已提交
595
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p1621114282212"><a name="zh-cn_topic_0000001149807881_p1621114282212"></a><a name="zh-cn_topic_0000001149807881_p1621114282212"></a>回调返回最大音量大小。</p>
M
mamingshuai 已提交
596 597 598 599 600 601 602 603
</td>
</tr>
</tbody>
</table>

**示例:**

```
D
duangavin123 已提交
604 605 606 607 608 609
audioManager.getMaxVolume(audio.AudioVolumeType.MEDIA, (err, value)=>{
   if (err) {
	   console.error(`failed to get maxvolume ${err.message}`);
	   return;
   }
   console.log(`Media getMaxVolume successful callback`);
M
mamingshuai 已提交
610 611 612
})
```

D
duangavin123 已提交
613
### getMaxVolume\(AudioVolumeType\)<a name="zh-cn_topic_0000001149807881_section155151345217"></a>
M
mamingshuai 已提交
614

D
duangavin123 已提交
615
获取某个流的最大音量,使用promise方式作为异步方法。
M
mamingshuai 已提交
616 617 618

**参数:**

D
duangavin123 已提交
619 620
<a name="zh-cn_topic_0000001149807881_table11211104210226"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row42111424228"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p14211842162217"><a name="zh-cn_topic_0000001149807881_p14211842162217"></a><a name="zh-cn_topic_0000001149807881_p14211842162217"></a>参数名</p>
M
mamingshuai 已提交
621
</th>
D
duangavin123 已提交
622
<th class="cellrowborder" valign="top" width="19.52%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p7211184211223"><a name="zh-cn_topic_0000001149807881_p7211184211223"></a><a name="zh-cn_topic_0000001149807881_p7211184211223"></a>类型</p>
M
mamingshuai 已提交
623
</th>
D
duangavin123 已提交
624
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p165812523592"><a name="zh-cn_topic_0000001149807881_p165812523592"></a><a name="zh-cn_topic_0000001149807881_p165812523592"></a>必填</p>
M
mamingshuai 已提交
625
</th>
D
duangavin123 已提交
626
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p821164232217"><a name="zh-cn_topic_0000001149807881_p821164232217"></a><a name="zh-cn_topic_0000001149807881_p821164232217"></a>说明</p>
M
mamingshuai 已提交
627 628 629
</th>
</tr>
</thead>
D
duangavin123 已提交
630
<tbody><tr id="zh-cn_topic_0000001149807881_row22111742112216"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p152121542152218"><a name="zh-cn_topic_0000001149807881_p152121542152218"></a><a name="zh-cn_topic_0000001149807881_p152121542152218"></a>audioType</p>
M
mamingshuai 已提交
631
</td>
D
duangavin123 已提交
632
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p9479411164814"><a name="zh-cn_topic_0000001149807881_p9479411164814"></a><a name="zh-cn_topic_0000001149807881_p9479411164814"></a><a href="#zh-cn_topic_0000001149807881_section92261857172218">AudioVolumeType</a></p>
M
mamingshuai 已提交
633
</td>
D
duangavin123 已提交
634
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p45811752165910"><a name="zh-cn_topic_0000001149807881_p45811752165910"></a><a name="zh-cn_topic_0000001149807881_p45811752165910"></a></p>
M
mamingshuai 已提交
635
</td>
D
duangavin123 已提交
636
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p1021294292216"><a name="zh-cn_topic_0000001149807881_p1021294292216"></a><a name="zh-cn_topic_0000001149807881_p1021294292216"></a>流类型。</p>
M
mamingshuai 已提交
637 638 639 640 641 642 643
</td>
</tr>
</tbody>
</table>

**返回值:**

D
duangavin123 已提交
644 645
<a name="zh-cn_topic_0000001149807881_table621215425220"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row3212842112215"><th class="cellrowborder" valign="top" width="26.02%" id="mcps1.1.3.1.1"><p id="zh-cn_topic_0000001149807881_p521274272216"><a name="zh-cn_topic_0000001149807881_p521274272216"></a><a name="zh-cn_topic_0000001149807881_p521274272216"></a>类型</p>
M
mamingshuai 已提交
646
</th>
D
duangavin123 已提交
647
<th class="cellrowborder" valign="top" width="73.98%" id="mcps1.1.3.1.2"><p id="zh-cn_topic_0000001149807881_p1121214215221"><a name="zh-cn_topic_0000001149807881_p1121214215221"></a><a name="zh-cn_topic_0000001149807881_p1121214215221"></a>说明</p>
M
mamingshuai 已提交
648 649 650
</th>
</tr>
</thead>
D
duangavin123 已提交
651
<tbody><tr id="zh-cn_topic_0000001149807881_row12121442192216"><td class="cellrowborder" valign="top" width="26.02%" headers="mcps1.1.3.1.1 "><p id="zh-cn_topic_0000001149807881_p72128426221"><a name="zh-cn_topic_0000001149807881_p72128426221"></a><a name="zh-cn_topic_0000001149807881_p72128426221"></a>Promise&lt;number&gt;</p>
M
mamingshuai 已提交
652
</td>
D
duangavin123 已提交
653
<td class="cellrowborder" valign="top" width="73.98%" headers="mcps1.1.3.1.2 "><p id="zh-cn_topic_0000001149807881_p4212114210226"><a name="zh-cn_topic_0000001149807881_p4212114210226"></a><a name="zh-cn_topic_0000001149807881_p4212114210226"></a>Promise回调返回最大音量大小。</p>
M
mamingshuai 已提交
654 655 656 657 658 659 660 661 662
</td>
</tr>
</tbody>
</table>

**示例:**

```
audioManager.getMaxVolume(audio.AudioVolumeType.MEDIA).then((data)=>
D
duangavin123 已提交
663
    console.log(`Media getMaxVolume successful callback`);
Z
zengyawen 已提交
664 665 666
)
```

D
duangavin123 已提交
667
### getDevices\(DeviceFlag, AsyncCallback<AudioDeviceDescriptors\>\)<a name="zh-cn_topic_0000001149807881_section11536182020523"></a>
Z
zengyawen 已提交
668

D
duangavin123 已提交
669
获取音频设备列表,使用callback方式作为异步方法。
Z
zengyawen 已提交
670 671 672

**参数:**

D
duangavin123 已提交
673 674
<a name="zh-cn_topic_0000001149807881_table8653191616249"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row165412169245"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p1665412161243"><a name="zh-cn_topic_0000001149807881_p1665412161243"></a><a name="zh-cn_topic_0000001149807881_p1665412161243"></a>参数名</p>
Z
zengyawen 已提交
675
</th>
D
duangavin123 已提交
676
<th class="cellrowborder" valign="top" width="26.26%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p1765491672417"><a name="zh-cn_topic_0000001149807881_p1765491672417"></a><a name="zh-cn_topic_0000001149807881_p1765491672417"></a>类型</p>
Z
zengyawen 已提交
677
</th>
D
duangavin123 已提交
678
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p113067111209"><a name="zh-cn_topic_0000001149807881_p113067111209"></a><a name="zh-cn_topic_0000001149807881_p113067111209"></a>必填</p>
Z
zengyawen 已提交
679
</th>
D
duangavin123 已提交
680
<th class="cellrowborder" valign="top" width="48.65%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p765431682419"><a name="zh-cn_topic_0000001149807881_p765431682419"></a><a name="zh-cn_topic_0000001149807881_p765431682419"></a>说明</p>
Z
zengyawen 已提交
681 682 683
</th>
</tr>
</thead>
D
duangavin123 已提交
684
<tbody><tr id="zh-cn_topic_0000001149807881_row1654191652419"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p126549165241"><a name="zh-cn_topic_0000001149807881_p126549165241"></a><a name="zh-cn_topic_0000001149807881_p126549165241"></a>deviceFlag</p>
Z
zengyawen 已提交
685
</td>
D
duangavin123 已提交
686
<td class="cellrowborder" valign="top" width="26.26%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p8654141622416"><a name="zh-cn_topic_0000001149807881_p8654141622416"></a><a name="zh-cn_topic_0000001149807881_p8654141622416"></a><a href="#zh-cn_topic_0000001149807881_section11285183164210">DeviceFlag</a></p>
Z
zengyawen 已提交
687
</td>
D
duangavin123 已提交
688
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p830651111019"><a name="zh-cn_topic_0000001149807881_p830651111019"></a><a name="zh-cn_topic_0000001149807881_p830651111019"></a></p>
Z
zengyawen 已提交
689
</td>
D
duangavin123 已提交
690
<td class="cellrowborder" valign="top" width="48.65%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p10654131616248"><a name="zh-cn_topic_0000001149807881_p10654131616248"></a><a name="zh-cn_topic_0000001149807881_p10654131616248"></a>设备类型的flag。</p>
Z
zengyawen 已提交
691 692
</td>
</tr>
D
duangavin123 已提交
693
<tr id="zh-cn_topic_0000001149807881_row16544162243"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p176541316122412"><a name="zh-cn_topic_0000001149807881_p176541316122412"></a><a name="zh-cn_topic_0000001149807881_p176541316122412"></a>callback</p>
Z
zengyawen 已提交
694
</td>
D
duangavin123 已提交
695
<td class="cellrowborder" valign="top" width="26.26%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p1565461620244"><a name="zh-cn_topic_0000001149807881_p1565461620244"></a><a name="zh-cn_topic_0000001149807881_p1565461620244"></a>AsyncCallback&lt;<a href="#zh-cn_topic_0000001149807881_section5181155710523">AudioDeviceDescriptors</a>&gt;</p>
Z
zengyawen 已提交
696
</td>
D
duangavin123 已提交
697
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p2307711908"><a name="zh-cn_topic_0000001149807881_p2307711908"></a><a name="zh-cn_topic_0000001149807881_p2307711908"></a></p>
Z
zengyawen 已提交
698
</td>
D
duangavin123 已提交
699
<td class="cellrowborder" valign="top" width="48.65%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p19654141672416"><a name="zh-cn_topic_0000001149807881_p19654141672416"></a><a name="zh-cn_topic_0000001149807881_p19654141672416"></a>回调,返回设备列表。</p>
Z
zengyawen 已提交
700 701 702 703 704 705 706 707
</td>
</tr>
</tbody>
</table>

**示例:**

```
D
duangavin123 已提交
708
audioManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG, (err, value)=>{
M
mamingshuai 已提交
709
   if (err) {
D
duangavin123 已提交
710
	   console.error(`failed to get getdevices ${err.message}`);
M
mamingshuai 已提交
711 712
	   return;
   }
D
duangavin123 已提交
713
   console.log(`Media getDevices successful callback`);
Z
zengyawen 已提交
714 715 716
})
```

D
duangavin123 已提交
717
### getDevices\(DeviceFlag\)<a name="zh-cn_topic_0000001149807881_section181733125210"></a>
Z
zengyawen 已提交
718

D
duangavin123 已提交
719
获取音频设备列表,使用promise方式作为异步方法。
Z
zengyawen 已提交
720 721 722

**参数:**

D
duangavin123 已提交
723 724
<a name="zh-cn_topic_0000001149807881_table17655516132411"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row4655616192414"><th class="cellrowborder" valign="top" width="17.57%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p1465518164247"><a name="zh-cn_topic_0000001149807881_p1465518164247"></a><a name="zh-cn_topic_0000001149807881_p1465518164247"></a>参数名</p>
Z
zengyawen 已提交
725
</th>
D
duangavin123 已提交
726
<th class="cellrowborder" valign="top" width="19.52%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p196551316172415"><a name="zh-cn_topic_0000001149807881_p196551316172415"></a><a name="zh-cn_topic_0000001149807881_p196551316172415"></a>类型</p>
Z
zengyawen 已提交
727
</th>
D
duangavin123 已提交
728
<th class="cellrowborder" valign="top" width="7.5200000000000005%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p13161629902"><a name="zh-cn_topic_0000001149807881_p13161629902"></a><a name="zh-cn_topic_0000001149807881_p13161629902"></a>必填</p>
Z
zengyawen 已提交
729
</th>
D
duangavin123 已提交
730
<th class="cellrowborder" valign="top" width="55.38999999999999%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p17655616102417"><a name="zh-cn_topic_0000001149807881_p17655616102417"></a><a name="zh-cn_topic_0000001149807881_p17655616102417"></a>说明</p>
Z
zengyawen 已提交
731 732 733
</th>
</tr>
</thead>
D
duangavin123 已提交
734
<tbody><tr id="zh-cn_topic_0000001149807881_row13656111662415"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p2092935211270"><a name="zh-cn_topic_0000001149807881_p2092935211270"></a><a name="zh-cn_topic_0000001149807881_p2092935211270"></a>deviceFlag</p>
Z
zengyawen 已提交
735
</td>
D
duangavin123 已提交
736
<td class="cellrowborder" valign="top" width="19.52%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p88719299489"><a name="zh-cn_topic_0000001149807881_p88719299489"></a><a name="zh-cn_topic_0000001149807881_p88719299489"></a><a href="#zh-cn_topic_0000001149807881_section11285183164210">DeviceFlag</a></p>
Z
zengyawen 已提交
737
</td>
D
duangavin123 已提交
738
<td class="cellrowborder" valign="top" width="7.5200000000000005%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p12161129209"><a name="zh-cn_topic_0000001149807881_p12161129209"></a><a name="zh-cn_topic_0000001149807881_p12161129209"></a></p>
Z
zengyawen 已提交
739
</td>
D
duangavin123 已提交
740
<td class="cellrowborder" valign="top" width="55.38999999999999%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p1692985222710"><a name="zh-cn_topic_0000001149807881_p1692985222710"></a><a name="zh-cn_topic_0000001149807881_p1692985222710"></a>设备类型的flag。</p>
Z
zengyawen 已提交
741 742 743 744 745 746 747
</td>
</tr>
</tbody>
</table>

**返回值:**

D
duangavin123 已提交
748 749
<a name="zh-cn_topic_0000001149807881_table565618166249"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row19656151662410"><th class="cellrowborder" valign="top" width="26.02%" id="mcps1.1.3.1.1"><p id="zh-cn_topic_0000001149807881_p15656916152415"><a name="zh-cn_topic_0000001149807881_p15656916152415"></a><a name="zh-cn_topic_0000001149807881_p15656916152415"></a>类型</p>
Z
zengyawen 已提交
750
</th>
D
duangavin123 已提交
751
<th class="cellrowborder" valign="top" width="73.98%" id="mcps1.1.3.1.2"><p id="zh-cn_topic_0000001149807881_p365641616247"><a name="zh-cn_topic_0000001149807881_p365641616247"></a><a name="zh-cn_topic_0000001149807881_p365641616247"></a>说明</p>
Z
zengyawen 已提交
752 753 754
</th>
</tr>
</thead>
D
duangavin123 已提交
755
<tbody><tr id="zh-cn_topic_0000001149807881_row665681617243"><td class="cellrowborder" valign="top" width="26.02%" headers="mcps1.1.3.1.1 "><p id="zh-cn_topic_0000001149807881_p5673192162816"><a name="zh-cn_topic_0000001149807881_p5673192162816"></a><a name="zh-cn_topic_0000001149807881_p5673192162816"></a>Promise&lt;<a href="#zh-cn_topic_0000001149807881_section5181155710523">AudioDeviceDescriptors</a>&gt;</p>
Z
zengyawen 已提交
756
</td>
D
duangavin123 已提交
757
<td class="cellrowborder" valign="top" width="73.98%" headers="mcps1.1.3.1.2 "><p id="zh-cn_topic_0000001149807881_p765751610249"><a name="zh-cn_topic_0000001149807881_p765751610249"></a><a name="zh-cn_topic_0000001149807881_p765751610249"></a>Promise回调返回设备列表。</p>
Z
zengyawen 已提交
758 759 760 761
</td>
</tr>
</tbody>
</table>
M
mamingshuai 已提交
762

Z
zengyawen 已提交
763 764 765
**示例:**

```
D
duangavin123 已提交
766 767
audioManager.getDevices(audio.DeviceFlag.OUTPUT_DEVICES_FLAG).then((data)=>
    console.log(`Media getDevices successful callback`);
Z
zengyawen 已提交
768 769 770
)
```

D
duangavin123 已提交
771
## AudioDeviceDescriptor<a name="zh-cn_topic_0000001149807881_section17427121913310"></a>
Z
zengyawen 已提交
772

D
duangavin123 已提交
773
描述音频设备。
Z
zengyawen 已提交
774

D
duangavin123 已提交
775 776
<a name="zh-cn_topic_0000001149807881_table5702164473415"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row97021944203413"><th class="cellrowborder" valign="top" width="17.378262173782623%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149807881_p1610322561817"><a name="zh-cn_topic_0000001149807881_p1610322561817"></a><a name="zh-cn_topic_0000001149807881_p1610322561817"></a>名称</p>
M
mamingshuai 已提交
777
</th>
D
duangavin123 已提交
778
<th class="cellrowborder" valign="top" width="21.547845215478453%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149807881_p177024446340"><a name="zh-cn_topic_0000001149807881_p177024446340"></a><a name="zh-cn_topic_0000001149807881_p177024446340"></a>类型</p>
M
mamingshuai 已提交
779
</th>
D
duangavin123 已提交
780
<th class="cellrowborder" valign="top" width="7.519248075192481%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149807881_p1103172518188"><a name="zh-cn_topic_0000001149807881_p1103172518188"></a><a name="zh-cn_topic_0000001149807881_p1103172518188"></a>必填</p>
M
mamingshuai 已提交
781
</th>
D
duangavin123 已提交
782
<th class="cellrowborder" valign="top" width="53.554644535546444%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149807881_p570274410345"><a name="zh-cn_topic_0000001149807881_p570274410345"></a><a name="zh-cn_topic_0000001149807881_p570274410345"></a>描述</p>
M
mamingshuai 已提交
783 784 785
</th>
</tr>
</thead>
D
duangavin123 已提交
786
<tbody><tr id="zh-cn_topic_0000001149807881_row1770204412344"><td class="cellrowborder" valign="top" width="17.378262173782623%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p116764916367"><a name="zh-cn_topic_0000001149807881_p116764916367"></a><a name="zh-cn_topic_0000001149807881_p116764916367"></a>deviceRole</p>
M
mamingshuai 已提交
787
</td>
D
duangavin123 已提交
788
<td class="cellrowborder" valign="top" width="21.547845215478453%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p1710432543618"><a name="zh-cn_topic_0000001149807881_p1710432543618"></a><a name="zh-cn_topic_0000001149807881_p1710432543618"></a><a href="#zh-cn_topic_0000001149807881_section380038142619">DeviceRole</a></p>
M
mamingshuai 已提交
789
</td>
D
duangavin123 已提交
790
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p14435512251"><a name="zh-cn_topic_0000001149807881_p14435512251"></a><a name="zh-cn_topic_0000001149807881_p14435512251"></a></p>
M
mamingshuai 已提交
791
</td>
D
duangavin123 已提交
792
<td class="cellrowborder" valign="top" width="53.554644535546444%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p8703114411348"><a name="zh-cn_topic_0000001149807881_p8703114411348"></a><a name="zh-cn_topic_0000001149807881_p8703114411348"></a>设备角色。</p>
M
mamingshuai 已提交
793 794
</td>
</tr>
D
duangavin123 已提交
795
<tr id="zh-cn_topic_0000001149807881_row370314447340"><td class="cellrowborder" valign="top" width="17.378262173782623%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149807881_p32441814173618"><a name="zh-cn_topic_0000001149807881_p32441814173618"></a><a name="zh-cn_topic_0000001149807881_p32441814173618"></a>deviceType</p>
M
mamingshuai 已提交
796
</td>
D
duangavin123 已提交
797
<td class="cellrowborder" valign="top" width="21.547845215478453%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149807881_p654132923620"><a name="zh-cn_topic_0000001149807881_p654132923620"></a><a name="zh-cn_topic_0000001149807881_p654132923620"></a><a href="#zh-cn_topic_0000001149807881_section11727420122710">DeviceType</a></p>
M
mamingshuai 已提交
798
</td>
D
duangavin123 已提交
799
<td class="cellrowborder" valign="top" width="7.519248075192481%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149807881_p44475515256"><a name="zh-cn_topic_0000001149807881_p44475515256"></a><a name="zh-cn_topic_0000001149807881_p44475515256"></a></p>
M
mamingshuai 已提交
800
</td>
D
duangavin123 已提交
801
<td class="cellrowborder" valign="top" width="53.554644535546444%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149807881_p207031344133411"><a name="zh-cn_topic_0000001149807881_p207031344133411"></a><a name="zh-cn_topic_0000001149807881_p207031344133411"></a>设备类型。</p>
M
mamingshuai 已提交
802 803 804 805 806
</td>
</tr>
</tbody>
</table>

D
duangavin123 已提交
807
## AudioDeviceDescriptors<a name="zh-cn_topic_0000001149807881_section5181155710523"></a>
M
mamingshuai 已提交
808

D
duangavin123 已提交
809 810
<a name="zh-cn_topic_0000001149807881_table169751229266"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149807881_row169757224268"><th class="cellrowborder" valign="top" width="19.7%" id="mcps1.1.3.1.1"><p id="zh-cn_topic_0000001149807881_p19975182202612"><a name="zh-cn_topic_0000001149807881_p19975182202612"></a><a name="zh-cn_topic_0000001149807881_p19975182202612"></a>名称</p>
M
mamingshuai 已提交
811
</th>
D
duangavin123 已提交
812
<th class="cellrowborder" valign="top" width="80.30000000000001%" id="mcps1.1.3.1.2"><p id="zh-cn_topic_0000001149807881_p109751622132611"><a name="zh-cn_topic_0000001149807881_p109751622132611"></a><a name="zh-cn_topic_0000001149807881_p109751622132611"></a>描述</p>
M
mamingshuai 已提交
813 814 815
</th>
</tr>
</thead>
D
duangavin123 已提交
816
<tbody><tr id="zh-cn_topic_0000001149807881_row169751322182613"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.1.3.1.1 "><p id="zh-cn_topic_0000001149807881_p139751522182616"><a name="zh-cn_topic_0000001149807881_p139751522182616"></a><a name="zh-cn_topic_0000001149807881_p139751522182616"></a>设备属性队列</p>
M
mamingshuai 已提交
817
</td>
D
duangavin123 已提交
818
<td class="cellrowborder" valign="top" width="80.30000000000001%" headers="mcps1.1.3.1.2 "><p id="zh-cn_topic_0000001149807881_p597532272616"><a name="zh-cn_topic_0000001149807881_p597532272616"></a><a name="zh-cn_topic_0000001149807881_p597532272616"></a>AudioDeviceDescriptor的队列,只读。</p>
M
mamingshuai 已提交
819 820 821 822 823
</td>
</tr>
</tbody>
</table>