@tencentcloud/sdk-mcp 1.2.9 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/resource/doc/chatuikit/faq/common/server.md +54 -0
- package/resource/doc/chatuikit/faq/web_sdk/faq.md +60 -0
- package/resource/doc/livekit/vue/components/co-guest-panel.md +5 -5
- package/resource/doc/livekit/vue/components/live-view.md +16 -49
- package/resource/doc/livekit/vue/{components/live-list.md → live-list-integration.md} +13 -44
- package/resource/doc/livekit/vue/live-player-desk-integration.md +293 -0
- package/resource/doc/livekit/vue/{components/live-player.md → live-player-h5-integration.md} +118 -110
- package/resource/doc/livekit/vue/{components/broadcast.md → live-pusher-integration.md} +77 -82
- package/resource/doc/livekit/vue/workflow.md +219 -0
- package/resource/doc/trtc/C++/ITRTCCloud.md +4131 -0
- package/resource/doc/trtc/C++/ITRTCStatistics.md +326 -0
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +1306 -0
- package/resource/doc/trtc/C++/ITXDeviceManager.md +1029 -0
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +2743 -0
- package/resource/doc/trtc/C++/TRTCTypeDef.md +3703 -0
- package/resource/doc/trtc/C++/TXLiteAVCode.md +930 -0
- package/resource/doc/trtc/android/TRTCCloud.md +3832 -0
- package/resource/doc/trtc/android/TRTCCloudDef.md +3945 -0
- package/resource/doc/trtc/android/TRTCCloudListener.md +2480 -0
- package/resource/doc/trtc/android/TRTCStatistics.md +296 -0
- package/resource/doc/trtc/android/TXAudioEffectManager.md +1344 -0
- package/resource/doc/trtc/android/TXBeautyManager.md +980 -0
- package/resource/doc/trtc/android/TXDeviceManager.md +441 -0
- package/resource/doc/trtc/android/TXLiteAVCode.md +914 -0
- package/resource/doc/trtc/iOS/TRTCCloud.md +4256 -0
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +2580 -0
- package/resource/doc/trtc/iOS/TRTCStatistics.md +296 -0
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +1117 -0
- package/resource/doc/trtc/iOS/TXBeautyManager.md +986 -0
- package/resource/doc/trtc/iOS/TXDeviceManager.md +1025 -0
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +929 -0
- package/resource/doc/trtc/iOS/TXLiveSDKTypeDef.md +3798 -0
- package/tools/definitions/get_faq_def.js +4 -0
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_trtc_native_api_def.js +17 -0
- package/tools/definitions/get_trtc_native_api_def.js.map +1 -0
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +9 -3
- package/tools/definitions/get_web_live_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/get_web_live_uikit_integration_def.js +32 -0
- package/tools/definitions/get_web_live_uikit_integration_def.js.map +1 -0
- package/tools/index.js +6 -2
- package/tools/index.js.map +1 -1
- package/tools/live/get-web-live-uikit-integration.js +52 -0
- package/tools/live/get-web-live-uikit-integration.js.map +1 -0
- package/tools/trtc/get-trtc-native-api.js +31 -0
- package/tools/trtc/get-trtc-native-api.js.map +1 -0
- package/utils/generate-structured-result.js +34 -0
- package/utils/generate-structured-result.js.map +1 -0
- package/utils/handle-component-name.js +0 -8
- package/utils/handle-component-name.js.map +1 -1
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -0,0 +1,1117 @@
|
|
|
1
|
+
# 腾讯云实时音视频(TRTC SDK )文档
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
`TXAudioEffectManager.h` 是腾讯云实时音视频(TRTC SDK ) iOS 平台的背景音乐、短音效和人声特效的管理类文档,用于对背景音乐、短音效和人声特效进行设置的管理类。
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
## TXAudioEffectManager
|
|
8
|
+
<table>
|
|
9
|
+
<tr>
|
|
10
|
+
<td rowspan="1" colSpan="1" >函数列表</td>
|
|
11
|
+
|
|
12
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
13
|
+
</tr>
|
|
14
|
+
|
|
15
|
+
<tr>
|
|
16
|
+
<td rowspan="1" colSpan="1" >[enableVoiceEarMonitor:](https://write.woa.com/document/87029789200396288)</td>
|
|
17
|
+
|
|
18
|
+
<td rowspan="1" colSpan="1" >开启耳返。</td>
|
|
19
|
+
</tr>
|
|
20
|
+
|
|
21
|
+
<tr>
|
|
22
|
+
<td rowspan="1" colSpan="1" >[setVoiceEarMonitorVolume:](https://write.woa.com/document/87029789200396288)</td>
|
|
23
|
+
|
|
24
|
+
<td rowspan="1" colSpan="1" >设置耳返音量。</td>
|
|
25
|
+
</tr>
|
|
26
|
+
|
|
27
|
+
<tr>
|
|
28
|
+
<td rowspan="1" colSpan="1" >[setVoiceReverbType:](https://write.woa.com/document/87029789200396288)</td>
|
|
29
|
+
|
|
30
|
+
<td rowspan="1" colSpan="1" >设置人声的混响效果。</td>
|
|
31
|
+
</tr>
|
|
32
|
+
|
|
33
|
+
<tr>
|
|
34
|
+
<td rowspan="1" colSpan="1" >[setVoiceChangerType:](https://write.woa.com/document/87029789200396288)</td>
|
|
35
|
+
|
|
36
|
+
<td rowspan="1" colSpan="1" >设置人声的变声特效。</td>
|
|
37
|
+
</tr>
|
|
38
|
+
|
|
39
|
+
<tr>
|
|
40
|
+
<td rowspan="1" colSpan="1" >[setVoiceVolume:](https://write.woa.com/document/87029789200396288)</td>
|
|
41
|
+
|
|
42
|
+
<td rowspan="1" colSpan="1" >设置语音音量。</td>
|
|
43
|
+
</tr>
|
|
44
|
+
|
|
45
|
+
<tr>
|
|
46
|
+
<td rowspan="1" colSpan="1" >[setVoicePitch:](https://write.woa.com/document/87029789200396288)</td>
|
|
47
|
+
|
|
48
|
+
<td rowspan="1" colSpan="1" >设置语音音调。</td>
|
|
49
|
+
</tr>
|
|
50
|
+
|
|
51
|
+
<tr>
|
|
52
|
+
<td rowspan="1" colSpan="1" >[startPlayMusic:onStart:onProgress:onComplete:](https://write.woa.com/document/87029789200396288)</td>
|
|
53
|
+
|
|
54
|
+
<td rowspan="1" colSpan="1" >开始播放背景音乐。</td>
|
|
55
|
+
</tr>
|
|
56
|
+
|
|
57
|
+
<tr>
|
|
58
|
+
<td rowspan="1" colSpan="1" >[stopPlayMusic:](https://write.woa.com/document/87029789200396288)</td>
|
|
59
|
+
|
|
60
|
+
<td rowspan="1" colSpan="1" >停止播放背景音乐。</td>
|
|
61
|
+
</tr>
|
|
62
|
+
|
|
63
|
+
<tr>
|
|
64
|
+
<td rowspan="1" colSpan="1" >[pausePlayMusic:](https://write.woa.com/document/87029789200396288)</td>
|
|
65
|
+
|
|
66
|
+
<td rowspan="1" colSpan="1" >暂停播放背景音乐。</td>
|
|
67
|
+
</tr>
|
|
68
|
+
|
|
69
|
+
<tr>
|
|
70
|
+
<td rowspan="1" colSpan="1" >[resumePlayMusic:](https://write.woa.com/document/87029789200396288)</td>
|
|
71
|
+
|
|
72
|
+
<td rowspan="1" colSpan="1" >恢复播放背景音乐。</td>
|
|
73
|
+
</tr>
|
|
74
|
+
|
|
75
|
+
<tr>
|
|
76
|
+
<td rowspan="1" colSpan="1" >[setAllMusicVolume:](https://write.woa.com/document/87029789200396288)</td>
|
|
77
|
+
|
|
78
|
+
<td rowspan="1" colSpan="1" >设置所有背景音乐的本地音量和远端音量的大小。</td>
|
|
79
|
+
</tr>
|
|
80
|
+
|
|
81
|
+
<tr>
|
|
82
|
+
<td rowspan="1" colSpan="1" >[setMusicPublishVolume:volume:](https://write.woa.com/document/87029789200396288)</td>
|
|
83
|
+
|
|
84
|
+
<td rowspan="1" colSpan="1" >设置某一首背景音乐的远端音量的大小。</td>
|
|
85
|
+
</tr>
|
|
86
|
+
|
|
87
|
+
<tr>
|
|
88
|
+
<td rowspan="1" colSpan="1" >[setMusicPlayoutVolume:volume:](https://write.woa.com/document/87029789200396288)</td>
|
|
89
|
+
|
|
90
|
+
<td rowspan="1" colSpan="1" >设置某一首背景音乐的本地音量的大小。</td>
|
|
91
|
+
</tr>
|
|
92
|
+
|
|
93
|
+
<tr>
|
|
94
|
+
<td rowspan="1" colSpan="1" >[setMusicPitch:pitch:](https://write.woa.com/document/87029789200396288)</td>
|
|
95
|
+
|
|
96
|
+
<td rowspan="1" colSpan="1" >调整背景音乐的音调高低。</td>
|
|
97
|
+
</tr>
|
|
98
|
+
|
|
99
|
+
<tr>
|
|
100
|
+
<td rowspan="1" colSpan="1" >[setMusicSpeedRate:speedRate:](https://write.woa.com/document/87029789200396288)</td>
|
|
101
|
+
|
|
102
|
+
<td rowspan="1" colSpan="1" >调整背景音乐的变速效果。</td>
|
|
103
|
+
</tr>
|
|
104
|
+
|
|
105
|
+
<tr>
|
|
106
|
+
<td rowspan="1" colSpan="1" >[getMusicCurrentPosInMS:](https://write.woa.com/document/87029789200396288)</td>
|
|
107
|
+
|
|
108
|
+
<td rowspan="1" colSpan="1" >获取背景音乐的播放进度(单位:毫秒)。</td>
|
|
109
|
+
</tr>
|
|
110
|
+
|
|
111
|
+
<tr>
|
|
112
|
+
<td rowspan="1" colSpan="1" >[getMusicDurationInMS:](https://write.woa.com/document/87029789200396288)</td>
|
|
113
|
+
|
|
114
|
+
<td rowspan="1" colSpan="1" >获取背景音乐的总时长(单位:毫秒)。</td>
|
|
115
|
+
</tr>
|
|
116
|
+
|
|
117
|
+
<tr>
|
|
118
|
+
<td rowspan="1" colSpan="1" >[seekMusicToPosInMS:pts:](https://write.woa.com/document/87029789200396288)</td>
|
|
119
|
+
|
|
120
|
+
<td rowspan="1" colSpan="1" >设置背景音乐的播放进度(单位:毫秒)。</td>
|
|
121
|
+
</tr>
|
|
122
|
+
|
|
123
|
+
<tr>
|
|
124
|
+
<td rowspan="1" colSpan="1" >[setMusicScratchSpeedRate:speedRate:](https://write.woa.com/document/87029789200396288)</td>
|
|
125
|
+
|
|
126
|
+
<td rowspan="1" colSpan="1" >调整搓碟的变速效果。</td>
|
|
127
|
+
</tr>
|
|
128
|
+
|
|
129
|
+
<tr>
|
|
130
|
+
<td rowspan="1" colSpan="1" >[preloadMusic:onProgress:onError:](https://write.woa.com/document/87029789200396288)</td>
|
|
131
|
+
|
|
132
|
+
<td rowspan="1" colSpan="1" >预加载背景音乐。</td>
|
|
133
|
+
</tr>
|
|
134
|
+
|
|
135
|
+
<tr>
|
|
136
|
+
<td rowspan="1" colSpan="1" >[getMusicTrackCount:](https://write.woa.com/document/87029789200396288)</td>
|
|
137
|
+
|
|
138
|
+
<td rowspan="1" colSpan="1" >获取背景音乐的音轨数量。</td>
|
|
139
|
+
</tr>
|
|
140
|
+
|
|
141
|
+
<tr>
|
|
142
|
+
<td rowspan="1" colSpan="1" >[setMusicTrack:track:](https://write.woa.com/document/87029789200396288)</td>
|
|
143
|
+
|
|
144
|
+
<td rowspan="1" colSpan="1" >指定背景音乐的播放音轨。</td>
|
|
145
|
+
</tr>
|
|
146
|
+
</table>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
## 结构体类型
|
|
150
|
+
<table>
|
|
151
|
+
<tr>
|
|
152
|
+
<td rowspan="1" colSpan="1" >函数列表</td>
|
|
153
|
+
|
|
154
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
155
|
+
</tr>
|
|
156
|
+
|
|
157
|
+
<tr>
|
|
158
|
+
<td rowspan="1" colSpan="1" >[TXAudioMusicParam](https://write.woa.com/document/87029789200396288)</td>
|
|
159
|
+
|
|
160
|
+
<td rowspan="1" colSpan="1" >背景音乐的播放控制信息</td>
|
|
161
|
+
</tr>
|
|
162
|
+
</table>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## 枚举类型
|
|
166
|
+
<table>
|
|
167
|
+
<tr>
|
|
168
|
+
<td rowspan="1" colSpan="1" >枚举类型</td>
|
|
169
|
+
|
|
170
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
171
|
+
</tr>
|
|
172
|
+
|
|
173
|
+
<tr>
|
|
174
|
+
<td rowspan="1" colSpan="1" >[TXVoiceReverbType](https://write.woa.com/document/87029789200396288)</td>
|
|
175
|
+
|
|
176
|
+
<td rowspan="1" colSpan="1" >混响特效</td>
|
|
177
|
+
</tr>
|
|
178
|
+
|
|
179
|
+
<tr>
|
|
180
|
+
<td rowspan="1" colSpan="1" >[TXVoiceChangeType](https://write.woa.com/document/87029789200396288)</td>
|
|
181
|
+
|
|
182
|
+
<td rowspan="1" colSpan="1" >变声特效</td>
|
|
183
|
+
</tr>
|
|
184
|
+
</table>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
## enableVoiceEarMonitor:
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
#### 开启耳返。
|
|
192
|
+
|
|
193
|
+
主播开启耳返后,可以在耳机里听到麦克风采集到的自己发出的声音,该特效适用于主播唱歌的应用场景中。
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
需要您注意的是,由于蓝牙耳机的硬件延迟非常高,所以在主播佩戴蓝牙耳机时无法开启此特效,请尽量在用户界面上提示主播佩戴有线耳机。
|
|
198
|
+
|
|
199
|
+
同时也需要注意,并非所有的手机开启此特效后都能达到优秀的耳返效果,我们已经对部分耳返效果不佳的手机屏蔽了该特效。
|
|
200
|
+
<table>
|
|
201
|
+
<tr>
|
|
202
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
203
|
+
|
|
204
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
205
|
+
</tr>
|
|
206
|
+
|
|
207
|
+
<tr>
|
|
208
|
+
<td rowspan="1" colSpan="1" >enable</td>
|
|
209
|
+
|
|
210
|
+
<td rowspan="1" colSpan="1" >YES:开启;NO:关闭。</td>
|
|
211
|
+
</tr>
|
|
212
|
+
</table>
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
> **注意**
|
|
216
|
+
>
|
|
217
|
+
|
|
218
|
+
> 仅在主播佩戴耳机时才能开启此特效,同时请您提示主播佩戴有线耳机。
|
|
219
|
+
>
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## setVoiceEarMonitorVolume:
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
#### 设置耳返音量。
|
|
227
|
+
|
|
228
|
+
通过该接口您可以设置耳返特效中声音的音量大小。
|
|
229
|
+
<table>
|
|
230
|
+
<tr>
|
|
231
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
232
|
+
|
|
233
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
234
|
+
</tr>
|
|
235
|
+
|
|
236
|
+
<tr>
|
|
237
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
238
|
+
|
|
239
|
+
<td rowspan="1" colSpan="1" >音量大小,取值范围为 [0, 150],默认值:100。</td>
|
|
240
|
+
</tr>
|
|
241
|
+
</table>
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
> **注意**
|
|
245
|
+
>
|
|
246
|
+
|
|
247
|
+
> 耳返的音量大小是影响用户耳返体验的重要因素之一,考虑到不同用户对音量的敏感度不同,强烈建议您在 UI 界面上开放耳返音量的调节滑杆,调节范围建议在 0~150 之间,其中 100~150 的增益效果对于部分采集音量较小的 Android 手机很有帮助。
|
|
248
|
+
>
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
## setVoiceReverbType:
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
#### 设置人声的混响效果。
|
|
256
|
+
|
|
257
|
+
通过该接口您可以设置人声的混响效果,具体特效请参见枚举定义 [TXVoiceReverbType](https://write.woa.com/document/87029789200396288)。
|
|
258
|
+
|
|
259
|
+
> **注意**
|
|
260
|
+
>
|
|
261
|
+
|
|
262
|
+
> 设置的效果在退出房间后会自动失效,如果下次进房还需要对应特效,需要调用此接口再次进行设置。
|
|
263
|
+
>
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
## setVoiceChangerType:
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
#### 设置人声的变声特效。
|
|
271
|
+
|
|
272
|
+
通过该接口您可以设置人声的变声特效,具体特效请参见枚举定义 [TXVoiceChangeType](https://write.woa.com/document/87029789200396288)。
|
|
273
|
+
|
|
274
|
+
> **注意**
|
|
275
|
+
>
|
|
276
|
+
|
|
277
|
+
> 设置的效果在退出房间后会自动失效,如果下次进房还需要对应特效,需要调用此接口再次进行设置。
|
|
278
|
+
>
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
## setVoiceVolume:
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
#### 设置语音音量。
|
|
286
|
+
|
|
287
|
+
该接口可以设置语音音量的大小,一般配合音乐音量的设置接口 [setAllMusicVolume](https://write.woa.com/document/87029789200396288) 协同使用,用于调谐语音和音乐在混音前各自的音量占比。
|
|
288
|
+
<table>
|
|
289
|
+
<tr>
|
|
290
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
291
|
+
|
|
292
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
293
|
+
</tr>
|
|
294
|
+
|
|
295
|
+
<tr>
|
|
296
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
297
|
+
|
|
298
|
+
<td rowspan="1" colSpan="1" >音量大小,取值范围为 [0 - 150],默认值:100。</td>
|
|
299
|
+
</tr>
|
|
300
|
+
</table>
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
> **注意**
|
|
304
|
+
>
|
|
305
|
+
|
|
306
|
+
> 如果将 volume 设置成 100 之后感觉音量还是太小,可以将 volume 最大设置成 150,但超过 100 的 volume 会有爆音的风险,请谨慎操作。
|
|
307
|
+
>
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
## setVoicePitch:
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
#### 设置语音音调。
|
|
315
|
+
|
|
316
|
+
该接口可以设置语音音调,用于实现变调不变速的目的。
|
|
317
|
+
<table>
|
|
318
|
+
<tr>
|
|
319
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
320
|
+
|
|
321
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
322
|
+
</tr>
|
|
323
|
+
|
|
324
|
+
<tr>
|
|
325
|
+
<td rowspan="1" colSpan="1" >pitch</td>
|
|
326
|
+
|
|
327
|
+
<td rowspan="1" colSpan="1" >音调,取值范围[-1.0f, 1.0f],默认值:0.0f。</td>
|
|
328
|
+
</tr>
|
|
329
|
+
</table>
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
## startPlayMusic:onStart:onProgress:onComplete:
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
#### 开始播放背景音乐。
|
|
337
|
+
|
|
338
|
+
每个音乐都需要您指定具体的 ID,您可以通过该 ID 对音乐的开始、停止、音量等进行设置。
|
|
339
|
+
<table>
|
|
340
|
+
<tr>
|
|
341
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
342
|
+
|
|
343
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
344
|
+
</tr>
|
|
345
|
+
|
|
346
|
+
<tr>
|
|
347
|
+
<td rowspan="1" colSpan="1" >completeBlock</td>
|
|
348
|
+
|
|
349
|
+
<td rowspan="1" colSpan="1" >播放结束回调。</td>
|
|
350
|
+
</tr>
|
|
351
|
+
|
|
352
|
+
<tr>
|
|
353
|
+
<td rowspan="1" colSpan="1" >musicParam</td>
|
|
354
|
+
|
|
355
|
+
<td rowspan="1" colSpan="1" >音乐参数。</td>
|
|
356
|
+
</tr>
|
|
357
|
+
|
|
358
|
+
<tr>
|
|
359
|
+
<td rowspan="1" colSpan="1" >progressBlock</td>
|
|
360
|
+
|
|
361
|
+
<td rowspan="1" colSpan="1" >播放进度回调。</td>
|
|
362
|
+
</tr>
|
|
363
|
+
|
|
364
|
+
<tr>
|
|
365
|
+
<td rowspan="1" colSpan="1" >startBlock</td>
|
|
366
|
+
|
|
367
|
+
<td rowspan="1" colSpan="1" >播放开始回调。</td>
|
|
368
|
+
</tr>
|
|
369
|
+
</table>
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
> **注意**
|
|
373
|
+
>
|
|
374
|
+
|
|
375
|
+
> 1. 如果要多次播放同一首背景音乐,请不要每次播放都分配一个新的 ID,我们推荐使用相同的 ID。
|
|
376
|
+
>
|
|
377
|
+
|
|
378
|
+
> 2. 若您希望同时播放多首不同的音乐,请为不同的音乐分配不同的 ID 进行播放。
|
|
379
|
+
>
|
|
380
|
+
|
|
381
|
+
> 3. 如果使用同一个 ID 播放不同音乐,SDK 会先停止播放旧的音乐,再播放新的音乐。
|
|
382
|
+
>
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
## stopPlayMusic:
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
#### 停止播放背景音乐。
|
|
390
|
+
<table>
|
|
391
|
+
<tr>
|
|
392
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
393
|
+
|
|
394
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
395
|
+
</tr>
|
|
396
|
+
|
|
397
|
+
<tr>
|
|
398
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
399
|
+
|
|
400
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
401
|
+
</tr>
|
|
402
|
+
</table>
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
## pausePlayMusic:
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
#### 暂停播放背景音乐。
|
|
410
|
+
<table>
|
|
411
|
+
<tr>
|
|
412
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
413
|
+
|
|
414
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
415
|
+
</tr>
|
|
416
|
+
|
|
417
|
+
<tr>
|
|
418
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
419
|
+
|
|
420
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
421
|
+
</tr>
|
|
422
|
+
</table>
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
## resumePlayMusic:
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
#### 恢复播放背景音乐。
|
|
430
|
+
<table>
|
|
431
|
+
<tr>
|
|
432
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
433
|
+
|
|
434
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
435
|
+
</tr>
|
|
436
|
+
|
|
437
|
+
<tr>
|
|
438
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
439
|
+
|
|
440
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
441
|
+
</tr>
|
|
442
|
+
</table>
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
## setAllMusicVolume:
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
#### 设置所有背景音乐的本地音量和远端音量的大小。
|
|
450
|
+
|
|
451
|
+
该接口可以设置所有背景音乐的本地音量和远端音量。
|
|
452
|
+
- 本地音量:即主播本地可以听到的背景音乐的音量大小。
|
|
453
|
+
|
|
454
|
+
- 远端音量:即观众端可以听到的背景音乐的音量大小。
|
|
455
|
+
|
|
456
|
+
<table>
|
|
457
|
+
<tr>
|
|
458
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
459
|
+
|
|
460
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
461
|
+
</tr>
|
|
462
|
+
|
|
463
|
+
<tr>
|
|
464
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
465
|
+
|
|
466
|
+
<td rowspan="1" colSpan="1" >音量大小,取值范围为 [0, 150],默认值:60。</td>
|
|
467
|
+
</tr>
|
|
468
|
+
</table>
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
> **注意**
|
|
472
|
+
>
|
|
473
|
+
|
|
474
|
+
> 如果将 volume 设置成 100 之后感觉音量还是太小,可以将 volume 最大设置成 150,但超过 100 的 volume 会有爆音的风险,请谨慎操作。
|
|
475
|
+
>
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
## setMusicPublishVolume:volume:
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
#### 设置某一首背景音乐的远端音量的大小。
|
|
483
|
+
|
|
484
|
+
该接口可以细粒度地控制每一首背景音乐的远端音量,也就是观众端可听到的背景音乐的音量大小。
|
|
485
|
+
<table>
|
|
486
|
+
<tr>
|
|
487
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
488
|
+
|
|
489
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
490
|
+
</tr>
|
|
491
|
+
|
|
492
|
+
<tr>
|
|
493
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
494
|
+
|
|
495
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
496
|
+
</tr>
|
|
497
|
+
|
|
498
|
+
<tr>
|
|
499
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
500
|
+
|
|
501
|
+
<td rowspan="1" colSpan="1" >音量大小,取值范围为 [0, 150];默认值:60。</td>
|
|
502
|
+
</tr>
|
|
503
|
+
</table>
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
> **注意**
|
|
507
|
+
>
|
|
508
|
+
|
|
509
|
+
> 如果将 volume 设置成 100 之后感觉音量还是太小,可以将 volume 最大设置成 150,但超过 100 的 volume 会有爆音的风险,请谨慎操作。
|
|
510
|
+
>
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
## setMusicPlayoutVolume:volume:
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
#### 设置某一首背景音乐的本地音量的大小。
|
|
518
|
+
|
|
519
|
+
该接口可以细粒度地控制每一首背景音乐的本地音量,也就是主播本地可以听到的背景音乐的音量大小。
|
|
520
|
+
<table>
|
|
521
|
+
<tr>
|
|
522
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
523
|
+
|
|
524
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
525
|
+
</tr>
|
|
526
|
+
|
|
527
|
+
<tr>
|
|
528
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
529
|
+
|
|
530
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
531
|
+
</tr>
|
|
532
|
+
|
|
533
|
+
<tr>
|
|
534
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
535
|
+
|
|
536
|
+
<td rowspan="1" colSpan="1" >音量大小,取值范围为 [0, 150],默认值:60。</td>
|
|
537
|
+
</tr>
|
|
538
|
+
</table>
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
> **注意**
|
|
542
|
+
>
|
|
543
|
+
|
|
544
|
+
> 如果将 volume 设置成 100 之后感觉音量还是太小,可以将 volume 最大设置成 150,但超过 100 的 volume 会有爆音的风险,请谨慎操作。
|
|
545
|
+
>
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
## setMusicPitch:pitch:
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
#### 调整背景音乐的音调高低。
|
|
553
|
+
<table>
|
|
554
|
+
<tr>
|
|
555
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
556
|
+
|
|
557
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
558
|
+
</tr>
|
|
559
|
+
|
|
560
|
+
<tr>
|
|
561
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
562
|
+
|
|
563
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
564
|
+
</tr>
|
|
565
|
+
|
|
566
|
+
<tr>
|
|
567
|
+
<td rowspan="1" colSpan="1" >pitch</td>
|
|
568
|
+
|
|
569
|
+
<td rowspan="1" colSpan="1" >音调,取值范围为 [-1.0f, 1.0f] 之间的浮点数,默认值:0.0f。</td>
|
|
570
|
+
</tr>
|
|
571
|
+
</table>
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
## setMusicSpeedRate:speedRate:
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
#### 调整背景音乐的变速效果。
|
|
579
|
+
<table>
|
|
580
|
+
<tr>
|
|
581
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
582
|
+
|
|
583
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
584
|
+
</tr>
|
|
585
|
+
|
|
586
|
+
<tr>
|
|
587
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
588
|
+
|
|
589
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
590
|
+
</tr>
|
|
591
|
+
|
|
592
|
+
<tr>
|
|
593
|
+
<td rowspan="1" colSpan="1" >speedRate</td>
|
|
594
|
+
|
|
595
|
+
<td rowspan="1" colSpan="1" >速度,取值范围为 [0.5f, 2.0f] 之间的浮点数,默认值:1.0f。</td>
|
|
596
|
+
</tr>
|
|
597
|
+
</table>
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
## getMusicCurrentPosInMS:
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
#### 获取背景音乐的播放进度(单位:毫秒)。
|
|
605
|
+
<table>
|
|
606
|
+
<tr>
|
|
607
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
608
|
+
|
|
609
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
610
|
+
</tr>
|
|
611
|
+
|
|
612
|
+
<tr>
|
|
613
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
614
|
+
|
|
615
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
616
|
+
</tr>
|
|
617
|
+
</table>
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
#### 返回值说明:
|
|
621
|
+
|
|
622
|
+
成功返回当前播放时间,单位:毫秒,失败返回 -1。
|
|
623
|
+
|
|
624
|
+
## getMusicDurationInMS:
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
#### 获取背景音乐的总时长(单位:毫秒)。
|
|
629
|
+
<table>
|
|
630
|
+
<tr>
|
|
631
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
632
|
+
|
|
633
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
634
|
+
</tr>
|
|
635
|
+
|
|
636
|
+
<tr>
|
|
637
|
+
<td rowspan="1" colSpan="1" >path</td>
|
|
638
|
+
|
|
639
|
+
<td rowspan="1" colSpan="1" >音乐文件路径。</td>
|
|
640
|
+
</tr>
|
|
641
|
+
</table>
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
#### 返回值说明:
|
|
645
|
+
|
|
646
|
+
成功返回时长,失败返回 -1。
|
|
647
|
+
|
|
648
|
+
## seekMusicToPosInMS:pts:
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
#### 设置背景音乐的播放进度(单位:毫秒)。
|
|
653
|
+
<table>
|
|
654
|
+
<tr>
|
|
655
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
656
|
+
|
|
657
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
658
|
+
</tr>
|
|
659
|
+
|
|
660
|
+
<tr>
|
|
661
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
662
|
+
|
|
663
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
664
|
+
</tr>
|
|
665
|
+
|
|
666
|
+
<tr>
|
|
667
|
+
<td rowspan="1" colSpan="1" >pts</td>
|
|
668
|
+
|
|
669
|
+
<td rowspan="1" colSpan="1" >单位: 毫秒。</td>
|
|
670
|
+
</tr>
|
|
671
|
+
</table>
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
> **注意**
|
|
675
|
+
>
|
|
676
|
+
|
|
677
|
+
> 请尽量避免过度频繁地调用该接口,因为该接口可能会再次读写音乐文件,耗时稍高。
|
|
678
|
+
>
|
|
679
|
+
|
|
680
|
+
> 因此,当用户拖拽音乐的播放进度条时,请在用户完成拖拽操作后再调用本接口。
|
|
681
|
+
>
|
|
682
|
+
|
|
683
|
+
> 因为 UI 上的进度条控件往往会以很高的频率反馈用户的拖拽进度,如不做频率限制,会导致较差的用户体验。
|
|
684
|
+
>
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
## setMusicScratchSpeedRate:speedRate:
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
#### 调整搓碟的变速效果。
|
|
692
|
+
<table>
|
|
693
|
+
<tr>
|
|
694
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
695
|
+
|
|
696
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
697
|
+
</tr>
|
|
698
|
+
|
|
699
|
+
<tr>
|
|
700
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
701
|
+
|
|
702
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
703
|
+
</tr>
|
|
704
|
+
|
|
705
|
+
<tr>
|
|
706
|
+
<td rowspan="1" colSpan="1" >scratchSpeedRate</td>
|
|
707
|
+
|
|
708
|
+
<td rowspan="1" colSpan="1" >搓碟速度,取值范围为 [-12.0, 12.0] 之间的浮点数,默认值是 1.0f,速度值正/负表示方向正/反,绝对值大小表示速度快慢。</td>
|
|
709
|
+
</tr>
|
|
710
|
+
</table>
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
> **注意**
|
|
714
|
+
>
|
|
715
|
+
|
|
716
|
+
> 前置条件 preloadMusic 成功。
|
|
717
|
+
>
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
## preloadMusic:onProgress:onError:
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
#### 预加载背景音乐。
|
|
725
|
+
|
|
726
|
+
每个音乐都需要您指定具体的 ID,您可以通过该 ID 对音乐的开始、停止、音量等进行设置。
|
|
727
|
+
<table>
|
|
728
|
+
<tr>
|
|
729
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
730
|
+
|
|
731
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
732
|
+
</tr>
|
|
733
|
+
|
|
734
|
+
<tr>
|
|
735
|
+
<td rowspan="1" colSpan="1" >preloadParam</td>
|
|
736
|
+
|
|
737
|
+
<td rowspan="1" colSpan="1" >预加载音乐参数。</td>
|
|
738
|
+
</tr>
|
|
739
|
+
</table>
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
> **注意**
|
|
743
|
+
>
|
|
744
|
+
|
|
745
|
+
> 1. 预先加载最多同时支持2个不同 ID 的预加载,且预加载时长不超过10分钟,使用完需调用 [stopPlayMusic](https://write.woa.com/document/87029789200396288),否则内存不释放。
|
|
746
|
+
>
|
|
747
|
+
|
|
748
|
+
> 2. 若该ID对应的音乐正在播放中,预加载会失败,需先调用 [stopPlayMusic](https://write.woa.com/document/87029789200396288)。
|
|
749
|
+
>
|
|
750
|
+
|
|
751
|
+
> 3. 当 ` musicParam ` 和传入 [startPlayMusic](https://write.woa.com/document/87029789200396288) 的 ` musicParam ` 完全相同时,预加载有效。
|
|
752
|
+
>
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
## getMusicTrackCount:
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
#### 获取背景音乐的音轨数量。
|
|
760
|
+
<table>
|
|
761
|
+
<tr>
|
|
762
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
763
|
+
|
|
764
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
765
|
+
</tr>
|
|
766
|
+
|
|
767
|
+
<tr>
|
|
768
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
769
|
+
|
|
770
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
771
|
+
</tr>
|
|
772
|
+
</table>
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
## setMusicTrack:track:
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
#### 指定背景音乐的播放音轨。
|
|
780
|
+
<table>
|
|
781
|
+
<tr>
|
|
782
|
+
<td rowspan="1" colSpan="1" >参数</td>
|
|
783
|
+
|
|
784
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
785
|
+
</tr>
|
|
786
|
+
|
|
787
|
+
<tr>
|
|
788
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
789
|
+
|
|
790
|
+
<td rowspan="1" colSpan="1" >音乐 ID。</td>
|
|
791
|
+
</tr>
|
|
792
|
+
|
|
793
|
+
<tr>
|
|
794
|
+
<td rowspan="1" colSpan="1" >index</td>
|
|
795
|
+
|
|
796
|
+
<td rowspan="1" colSpan="1" >默认播放第一个音轨。取值范围[0, 音轨总数)。</td>
|
|
797
|
+
</tr>
|
|
798
|
+
</table>
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
> **注意**
|
|
802
|
+
>
|
|
803
|
+
|
|
804
|
+
> 音轨总数量可通过 getMusicTrackCount 接口获取。
|
|
805
|
+
>
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
## TXVoiceReverbType
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
#### 混响特效
|
|
813
|
+
|
|
814
|
+
混响特效可以作用于人声之上,通过声学算法对声音进行叠加处理,模拟出各种不同环境下的临场感受,目前支持如下几种混响效果:
|
|
815
|
+
|
|
816
|
+
0:关闭;1:KTV;2:小房间;3:大会堂;4:低沉;5:洪亮;6:金属声;7:磁性;8:空灵;9:录音棚;10:悠扬 11:录音棚2。
|
|
817
|
+
<table>
|
|
818
|
+
<tr>
|
|
819
|
+
<td rowspan="1" colSpan="1" >枚举</td>
|
|
820
|
+
|
|
821
|
+
<td rowspan="1" colSpan="1" >取值</td>
|
|
822
|
+
|
|
823
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
824
|
+
</tr>
|
|
825
|
+
|
|
826
|
+
<tr>
|
|
827
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_0</td>
|
|
828
|
+
|
|
829
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
830
|
+
|
|
831
|
+
<td rowspan="1" colSpan="1" >关闭特效</td>
|
|
832
|
+
</tr>
|
|
833
|
+
|
|
834
|
+
<tr>
|
|
835
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_1</td>
|
|
836
|
+
|
|
837
|
+
<td rowspan="1" colSpan="1" >1</td>
|
|
838
|
+
|
|
839
|
+
<td rowspan="1" colSpan="1" >KTV</td>
|
|
840
|
+
</tr>
|
|
841
|
+
|
|
842
|
+
<tr>
|
|
843
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_2</td>
|
|
844
|
+
|
|
845
|
+
<td rowspan="1" colSpan="1" >2</td>
|
|
846
|
+
|
|
847
|
+
<td rowspan="1" colSpan="1" >小房间</td>
|
|
848
|
+
</tr>
|
|
849
|
+
|
|
850
|
+
<tr>
|
|
851
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_3</td>
|
|
852
|
+
|
|
853
|
+
<td rowspan="1" colSpan="1" >3</td>
|
|
854
|
+
|
|
855
|
+
<td rowspan="1" colSpan="1" >大会堂</td>
|
|
856
|
+
</tr>
|
|
857
|
+
|
|
858
|
+
<tr>
|
|
859
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_4</td>
|
|
860
|
+
|
|
861
|
+
<td rowspan="1" colSpan="1" >4</td>
|
|
862
|
+
|
|
863
|
+
<td rowspan="1" colSpan="1" >低沉</td>
|
|
864
|
+
</tr>
|
|
865
|
+
|
|
866
|
+
<tr>
|
|
867
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_5</td>
|
|
868
|
+
|
|
869
|
+
<td rowspan="1" colSpan="1" >5</td>
|
|
870
|
+
|
|
871
|
+
<td rowspan="1" colSpan="1" >洪亮</td>
|
|
872
|
+
</tr>
|
|
873
|
+
|
|
874
|
+
<tr>
|
|
875
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_6</td>
|
|
876
|
+
|
|
877
|
+
<td rowspan="1" colSpan="1" >6</td>
|
|
878
|
+
|
|
879
|
+
<td rowspan="1" colSpan="1" >金属声</td>
|
|
880
|
+
</tr>
|
|
881
|
+
|
|
882
|
+
<tr>
|
|
883
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_7</td>
|
|
884
|
+
|
|
885
|
+
<td rowspan="1" colSpan="1" >7</td>
|
|
886
|
+
|
|
887
|
+
<td rowspan="1" colSpan="1" >磁性</td>
|
|
888
|
+
</tr>
|
|
889
|
+
|
|
890
|
+
<tr>
|
|
891
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_8</td>
|
|
892
|
+
|
|
893
|
+
<td rowspan="1" colSpan="1" >8</td>
|
|
894
|
+
|
|
895
|
+
<td rowspan="1" colSpan="1" >空灵</td>
|
|
896
|
+
</tr>
|
|
897
|
+
|
|
898
|
+
<tr>
|
|
899
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_9</td>
|
|
900
|
+
|
|
901
|
+
<td rowspan="1" colSpan="1" >9</td>
|
|
902
|
+
|
|
903
|
+
<td rowspan="1" colSpan="1" >录音棚</td>
|
|
904
|
+
</tr>
|
|
905
|
+
|
|
906
|
+
<tr>
|
|
907
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_10</td>
|
|
908
|
+
|
|
909
|
+
<td rowspan="1" colSpan="1" >10</td>
|
|
910
|
+
|
|
911
|
+
<td rowspan="1" colSpan="1" >悠扬</td>
|
|
912
|
+
</tr>
|
|
913
|
+
|
|
914
|
+
<tr>
|
|
915
|
+
<td rowspan="1" colSpan="1" >TXVoiceReverbType_11</td>
|
|
916
|
+
|
|
917
|
+
<td rowspan="1" colSpan="1" >11</td>
|
|
918
|
+
|
|
919
|
+
<td rowspan="1" colSpan="1" >录音棚2</td>
|
|
920
|
+
</tr>
|
|
921
|
+
</table>
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
## TXVoiceChangeType
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
#### 变声特效
|
|
929
|
+
|
|
930
|
+
变声特效可以作用于人声之上,通过声学算法对人声进行二次处理,以获得与原始声音所不同的音色,目前支持如下几种变声特效:
|
|
931
|
+
|
|
932
|
+
0:关闭;1:熊孩子;2:萝莉;3:大叔;4:重金属;5:感冒;6:外语腔;7:困兽;8:肥宅;9:强电流;10:重机械;11:空灵;12:猪八戒;13:绿巨人。
|
|
933
|
+
<table>
|
|
934
|
+
<tr>
|
|
935
|
+
<td rowspan="1" colSpan="1" >枚举</td>
|
|
936
|
+
|
|
937
|
+
<td rowspan="1" colSpan="1" >取值</td>
|
|
938
|
+
|
|
939
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
940
|
+
</tr>
|
|
941
|
+
|
|
942
|
+
<tr>
|
|
943
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_0</td>
|
|
944
|
+
|
|
945
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
946
|
+
|
|
947
|
+
<td rowspan="1" colSpan="1" >关闭</td>
|
|
948
|
+
</tr>
|
|
949
|
+
|
|
950
|
+
<tr>
|
|
951
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_1</td>
|
|
952
|
+
|
|
953
|
+
<td rowspan="1" colSpan="1" >1</td>
|
|
954
|
+
|
|
955
|
+
<td rowspan="1" colSpan="1" >熊孩子</td>
|
|
956
|
+
</tr>
|
|
957
|
+
|
|
958
|
+
<tr>
|
|
959
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_2</td>
|
|
960
|
+
|
|
961
|
+
<td rowspan="1" colSpan="1" >2</td>
|
|
962
|
+
|
|
963
|
+
<td rowspan="1" colSpan="1" >萝莉</td>
|
|
964
|
+
</tr>
|
|
965
|
+
|
|
966
|
+
<tr>
|
|
967
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_3</td>
|
|
968
|
+
|
|
969
|
+
<td rowspan="1" colSpan="1" >3</td>
|
|
970
|
+
|
|
971
|
+
<td rowspan="1" colSpan="1" >大叔</td>
|
|
972
|
+
</tr>
|
|
973
|
+
|
|
974
|
+
<tr>
|
|
975
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_4</td>
|
|
976
|
+
|
|
977
|
+
<td rowspan="1" colSpan="1" >4</td>
|
|
978
|
+
|
|
979
|
+
<td rowspan="1" colSpan="1" >重金属</td>
|
|
980
|
+
</tr>
|
|
981
|
+
|
|
982
|
+
<tr>
|
|
983
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_5</td>
|
|
984
|
+
|
|
985
|
+
<td rowspan="1" colSpan="1" >5</td>
|
|
986
|
+
|
|
987
|
+
<td rowspan="1" colSpan="1" >感冒</td>
|
|
988
|
+
</tr>
|
|
989
|
+
|
|
990
|
+
<tr>
|
|
991
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_6</td>
|
|
992
|
+
|
|
993
|
+
<td rowspan="1" colSpan="1" >6</td>
|
|
994
|
+
|
|
995
|
+
<td rowspan="1" colSpan="1" >外语腔</td>
|
|
996
|
+
</tr>
|
|
997
|
+
|
|
998
|
+
<tr>
|
|
999
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_7</td>
|
|
1000
|
+
|
|
1001
|
+
<td rowspan="1" colSpan="1" >7</td>
|
|
1002
|
+
|
|
1003
|
+
<td rowspan="1" colSpan="1" >困兽</td>
|
|
1004
|
+
</tr>
|
|
1005
|
+
|
|
1006
|
+
<tr>
|
|
1007
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_8</td>
|
|
1008
|
+
|
|
1009
|
+
<td rowspan="1" colSpan="1" >8</td>
|
|
1010
|
+
|
|
1011
|
+
<td rowspan="1" colSpan="1" >肥宅</td>
|
|
1012
|
+
</tr>
|
|
1013
|
+
|
|
1014
|
+
<tr>
|
|
1015
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_9</td>
|
|
1016
|
+
|
|
1017
|
+
<td rowspan="1" colSpan="1" >9</td>
|
|
1018
|
+
|
|
1019
|
+
<td rowspan="1" colSpan="1" >强电流</td>
|
|
1020
|
+
</tr>
|
|
1021
|
+
|
|
1022
|
+
<tr>
|
|
1023
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_10</td>
|
|
1024
|
+
|
|
1025
|
+
<td rowspan="1" colSpan="1" >10</td>
|
|
1026
|
+
|
|
1027
|
+
<td rowspan="1" colSpan="1" >重机械</td>
|
|
1028
|
+
</tr>
|
|
1029
|
+
|
|
1030
|
+
<tr>
|
|
1031
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_11</td>
|
|
1032
|
+
|
|
1033
|
+
<td rowspan="1" colSpan="1" >11</td>
|
|
1034
|
+
|
|
1035
|
+
<td rowspan="1" colSpan="1" >空灵</td>
|
|
1036
|
+
</tr>
|
|
1037
|
+
|
|
1038
|
+
<tr>
|
|
1039
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_12</td>
|
|
1040
|
+
|
|
1041
|
+
<td rowspan="1" colSpan="1" >12</td>
|
|
1042
|
+
|
|
1043
|
+
<td rowspan="1" colSpan="1" >猪八戒</td>
|
|
1044
|
+
</tr>
|
|
1045
|
+
|
|
1046
|
+
<tr>
|
|
1047
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangeType_13</td>
|
|
1048
|
+
|
|
1049
|
+
<td rowspan="1" colSpan="1" >13</td>
|
|
1050
|
+
|
|
1051
|
+
<td rowspan="1" colSpan="1" >绿巨人</td>
|
|
1052
|
+
</tr>
|
|
1053
|
+
</table>
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
## TXAudioMusicParam
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
#### 背景音乐的播放控制信息
|
|
1061
|
+
|
|
1062
|
+
该信息用于在接口 [startPlayMusic](https://write.woa.com/document/87029789200396288) 中指定背景音乐的相关信息,包括播放 ID、文件路径和循环次数等:
|
|
1063
|
+
|
|
1064
|
+
1. 如果要多次播放同一首背景音乐,请不要每次播放都分配一个新的 ID,我们推荐使用相同的 ID。
|
|
1065
|
+
|
|
1066
|
+
2. 若您希望同时播放多首不同的音乐,请为不同的音乐分配不同的 ID 进行播放。
|
|
1067
|
+
|
|
1068
|
+
3. 如果使用同一个 ID 播放不同音乐,SDK 会先停止播放旧的音乐,再播放新的音乐。
|
|
1069
|
+
<table>
|
|
1070
|
+
<tr>
|
|
1071
|
+
<td rowspan="1" colSpan="1" >枚举类型</td>
|
|
1072
|
+
|
|
1073
|
+
<td rowspan="1" colSpan="1" >描述</td>
|
|
1074
|
+
</tr>
|
|
1075
|
+
|
|
1076
|
+
<tr>
|
|
1077
|
+
<td rowspan="1" colSpan="1" >ID</td>
|
|
1078
|
+
|
|
1079
|
+
<td rowspan="1" colSpan="1" >【字段含义】音乐 ID。<br>【特殊说明】SDK 允许播放多路音乐,因此需要使用 ID 进行标记,用于控制音乐的开始、停止、音量等。</td>
|
|
1080
|
+
</tr>
|
|
1081
|
+
|
|
1082
|
+
<tr>
|
|
1083
|
+
<td rowspan="1" colSpan="1" >endTimeMS</td>
|
|
1084
|
+
|
|
1085
|
+
<td rowspan="1" colSpan="1" >【字段含义】音乐结束播放时间点,单位毫秒,0表示播放至文件结尾。</td>
|
|
1086
|
+
</tr>
|
|
1087
|
+
|
|
1088
|
+
<tr>
|
|
1089
|
+
<td rowspan="1" colSpan="1" >isShortFile</td>
|
|
1090
|
+
|
|
1091
|
+
<td rowspan="1" colSpan="1" >【字段含义】播放的是否为短音乐文件。<br>【推荐取值】YES:需要重复播放的短音乐文件;NO:正常的音乐文件。默认值:NO。</td>
|
|
1092
|
+
</tr>
|
|
1093
|
+
|
|
1094
|
+
<tr>
|
|
1095
|
+
<td rowspan="1" colSpan="1" >loopCount</td>
|
|
1096
|
+
|
|
1097
|
+
<td rowspan="1" colSpan="1" >【字段含义】音乐循环播放的次数。<br>【推荐取值】取值范围为 [0, 任意正整数],默认值:0。0 表示播放音乐一次;1 表示播放音乐两次;以此类推。</td>
|
|
1098
|
+
</tr>
|
|
1099
|
+
|
|
1100
|
+
<tr>
|
|
1101
|
+
<td rowspan="1" colSpan="1" >path</td>
|
|
1102
|
+
|
|
1103
|
+
<td rowspan="1" colSpan="1" >【字段含义】音效文件的完整路径或 URL 地址。支持的音频格式包括 MP3、AAC、M4A、WAV。</td>
|
|
1104
|
+
</tr>
|
|
1105
|
+
|
|
1106
|
+
<tr>
|
|
1107
|
+
<td rowspan="1" colSpan="1" >publish</td>
|
|
1108
|
+
|
|
1109
|
+
<td rowspan="1" colSpan="1" >【字段含义】是否将音乐传到远端。<br>【推荐取值】YES:音乐在本地播放的同时,远端用户也能听到该音乐;NO:主播只能在本地听到该音乐,远端观众听不到。默认值:NO。</td>
|
|
1110
|
+
</tr>
|
|
1111
|
+
|
|
1112
|
+
<tr>
|
|
1113
|
+
<td rowspan="1" colSpan="1" >startTimeMS</td>
|
|
1114
|
+
|
|
1115
|
+
<td rowspan="1" colSpan="1" >【字段含义】音乐开始播放时间点,单位:毫秒。</td>
|
|
1116
|
+
</tr>
|
|
1117
|
+
</table>
|