@tencent-rtc/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 +44 -0
- package/resource/doc/chatuikit/faq/web_sdk/faq.md +57 -0
- package/resource/doc/livekit/vue/components/co-guest-panel.md +3 -3
- package/resource/doc/livekit/vue/components/live-view.md +4 -4
- package/resource/doc/livekit/vue/{components/live-list.md → live-list-integration.md} +7 -7
- package/resource/doc/livekit/vue/{components/live-player.md → live-player-desk-integration.md} +8 -8
- package/resource/doc/livekit/vue/live-player-h5-integration.md +269 -0
- package/resource/doc/livekit/vue/workflow.md +218 -0
- package/resource/doc/trtc/C++/ITRTCCloud.md +4119 -0
- package/resource/doc/trtc/C++/ITRTCStatistics.md +325 -0
- package/resource/doc/trtc/C++/ITXAudioEffectManager.md +1289 -0
- package/resource/doc/trtc/C++/ITXDeviceManager.md +1028 -0
- package/resource/doc/trtc/C++/TRTCCloudCallback.md +2650 -0
- package/resource/doc/trtc/C++/TRTCTypeDef.md +3600 -0
- package/resource/doc/trtc/C++/TXLiteAVCode.md +921 -0
- package/resource/doc/trtc/android/TRTCCloud.md +3782 -0
- package/resource/doc/trtc/android/TRTCCloudDef.md +3880 -0
- package/resource/doc/trtc/android/TRTCCloudListener.md +2431 -0
- package/resource/doc/trtc/android/TRTCStatistics.md +295 -0
- package/resource/doc/trtc/android/TXAudioEffectManager.md +1289 -0
- package/resource/doc/trtc/android/TXBeautyManager.md +979 -0
- package/resource/doc/trtc/android/TXDeviceManager.md +440 -0
- package/resource/doc/trtc/android/TXLiteAVCode.md +905 -0
- package/resource/doc/trtc/iOS/TRTCCloud.md +4238 -0
- package/resource/doc/trtc/iOS/TRTCCloudDef.md +3730 -0
- package/resource/doc/trtc/iOS/TRTCCloudDelegate.md +2531 -0
- package/resource/doc/trtc/iOS/TRTCStatistics.md +295 -0
- package/resource/doc/trtc/iOS/TXAudioEffectManager.md +1100 -0
- package/resource/doc/trtc/iOS/TXBeautyManager.md +985 -0
- package/resource/doc/trtc/iOS/TXDeviceManager.md +1024 -0
- package/resource/doc/trtc/iOS/TXLiteAVCode.md +928 -0
- package/tools/definitions/get_faq_def.js +4 -0
- package/tools/definitions/get_faq_def.js.map +1 -1
- package/tools/definitions/get_native_live_api_def.js +1 -1
- package/tools/definitions/get_trtc_native_api_def.js +16 -0
- package/tools/definitions/get_trtc_native_api_def.js.map +1 -0
- package/tools/definitions/get_web_live_uikit_component_detail_def.js +13 -8
- 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
- /package/resource/doc/livekit/vue/{components/broadcast.md → live-pusher-integration.md} +0 -0
|
@@ -0,0 +1,1289 @@
|
|
|
1
|
+
# TRTC Real-Time Communication (TRTC SDK) Documentation
|
|
2
|
+
## Feature Overview
|
|
3
|
+
`ITXAudioEffectManager.h` is the manager class for handling background music, sound effects, and vocal effects on the TRTC Real-Time Communication (TRTC SDK) C++. Use this class to configure and control background music, sound effects, and vocal processing features.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## ITXMusicPreloadObserver
|
|
7
|
+
<table>
|
|
8
|
+
<tr>
|
|
9
|
+
<td rowspan="1" colSpan="1" >Function List</td>
|
|
10
|
+
|
|
11
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
12
|
+
</tr>
|
|
13
|
+
|
|
14
|
+
<tr>
|
|
15
|
+
<td rowspan="1" colSpan="1" >[onLoadProgress](https://write.woa.com/document/87030074293530624)</td>
|
|
16
|
+
|
|
17
|
+
<td rowspan="1" colSpan="1" >Background music preloading progress</td>
|
|
18
|
+
</tr>
|
|
19
|
+
|
|
20
|
+
<tr>
|
|
21
|
+
<td rowspan="1" colSpan="1" >[onLoadError](https://write.woa.com/document/87030074293530624)</td>
|
|
22
|
+
|
|
23
|
+
<td rowspan="1" colSpan="1" >Error in background music preloading</td>
|
|
24
|
+
</tr>
|
|
25
|
+
</table>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## ITXMusicPlayObserver
|
|
29
|
+
<table>
|
|
30
|
+
<tr>
|
|
31
|
+
<td rowspan="1" colSpan="1" >Function List</td>
|
|
32
|
+
|
|
33
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
34
|
+
</tr>
|
|
35
|
+
|
|
36
|
+
<tr>
|
|
37
|
+
<td rowspan="1" colSpan="1" >[onStart](https://write.woa.com/document/87030074293530624)</td>
|
|
38
|
+
|
|
39
|
+
<td rowspan="1" colSpan="1" >Start playing background music</td>
|
|
40
|
+
</tr>
|
|
41
|
+
|
|
42
|
+
<tr>
|
|
43
|
+
<td rowspan="1" colSpan="1" >[onPlayProgress](https://write.woa.com/document/87030074293530624)</td>
|
|
44
|
+
|
|
45
|
+
<td rowspan="1" colSpan="1" >Background music playback progress</td>
|
|
46
|
+
</tr>
|
|
47
|
+
|
|
48
|
+
<tr>
|
|
49
|
+
<td rowspan="1" colSpan="1" >[onComplete](https://write.woa.com/document/87030074293530624)</td>
|
|
50
|
+
|
|
51
|
+
<td rowspan="1" colSpan="1" >Background music playback completed</td>
|
|
52
|
+
</tr>
|
|
53
|
+
</table>
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## ITXAudioEffectManager
|
|
57
|
+
<table>
|
|
58
|
+
<tr>
|
|
59
|
+
<td rowspan="1" colSpan="1" >Function List</td>
|
|
60
|
+
|
|
61
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
62
|
+
</tr>
|
|
63
|
+
|
|
64
|
+
<tr>
|
|
65
|
+
<td rowspan="1" colSpan="1" >[enableVoiceEarMonitor](https://write.woa.com/document/87030074293530624)</td>
|
|
66
|
+
|
|
67
|
+
<td rowspan="1" colSpan="1" >Enable ear return</td>
|
|
68
|
+
</tr>
|
|
69
|
+
|
|
70
|
+
<tr>
|
|
71
|
+
<td rowspan="1" colSpan="1" >[setVoiceEarMonitorVolume](https://write.woa.com/document/87030074293530624)</td>
|
|
72
|
+
|
|
73
|
+
<td rowspan="1" colSpan="1" >Set ear return volume</td>
|
|
74
|
+
</tr>
|
|
75
|
+
|
|
76
|
+
<tr>
|
|
77
|
+
<td rowspan="1" colSpan="1" >[setVoiceReverbType](https://write.woa.com/document/87030074293530624)</td>
|
|
78
|
+
|
|
79
|
+
<td rowspan="1" colSpan="1" >Set vocal reverb effect</td>
|
|
80
|
+
</tr>
|
|
81
|
+
|
|
82
|
+
<tr>
|
|
83
|
+
<td rowspan="1" colSpan="1" >[setVoiceChangerType](https://write.woa.com/document/87030074293530624)</td>
|
|
84
|
+
|
|
85
|
+
<td rowspan="1" colSpan="1" >Set vocal voice changing effect</td>
|
|
86
|
+
</tr>
|
|
87
|
+
|
|
88
|
+
<tr>
|
|
89
|
+
<td rowspan="1" colSpan="1" >[setVoiceCaptureVolume](https://write.woa.com/document/87030074293530624)</td>
|
|
90
|
+
|
|
91
|
+
<td rowspan="1" colSpan="1" >Set speech volume</td>
|
|
92
|
+
</tr>
|
|
93
|
+
|
|
94
|
+
<tr>
|
|
95
|
+
<td rowspan="1" colSpan="1" >[setVoicePitch](https://write.woa.com/document/87030074293530624)</td>
|
|
96
|
+
|
|
97
|
+
<td rowspan="1" colSpan="1" >Set speech tone</td>
|
|
98
|
+
</tr>
|
|
99
|
+
|
|
100
|
+
<tr>
|
|
101
|
+
<td rowspan="1" colSpan="1" >[setMusicObserver](https://write.woa.com/document/87030074293530624)</td>
|
|
102
|
+
|
|
103
|
+
<td rowspan="1" colSpan="1" >Set the event callback interface for background music</td>
|
|
104
|
+
</tr>
|
|
105
|
+
|
|
106
|
+
<tr>
|
|
107
|
+
<td rowspan="1" colSpan="1" >[startPlayMusic](https://write.woa.com/document/87030074293530624)</td>
|
|
108
|
+
|
|
109
|
+
<td rowspan="1" colSpan="1" >Start playing background music</td>
|
|
110
|
+
</tr>
|
|
111
|
+
|
|
112
|
+
<tr>
|
|
113
|
+
<td rowspan="1" colSpan="1" >[stopPlayMusic](https://write.woa.com/document/87030074293530624)</td>
|
|
114
|
+
|
|
115
|
+
<td rowspan="1" colSpan="1" >Stop playing background music</td>
|
|
116
|
+
</tr>
|
|
117
|
+
|
|
118
|
+
<tr>
|
|
119
|
+
<td rowspan="1" colSpan="1" >[pausePlayMusic](https://write.woa.com/document/87030074293530624)</td>
|
|
120
|
+
|
|
121
|
+
<td rowspan="1" colSpan="1" >Pause background music</td>
|
|
122
|
+
</tr>
|
|
123
|
+
|
|
124
|
+
<tr>
|
|
125
|
+
<td rowspan="1" colSpan="1" >[resumePlayMusic](https://write.woa.com/document/87030074293530624)</td>
|
|
126
|
+
|
|
127
|
+
<td rowspan="1" colSpan="1" >Resume background music</td>
|
|
128
|
+
</tr>
|
|
129
|
+
|
|
130
|
+
<tr>
|
|
131
|
+
<td rowspan="1" colSpan="1" >[setAllMusicVolume](https://write.woa.com/document/87030074293530624)</td>
|
|
132
|
+
|
|
133
|
+
<td rowspan="1" colSpan="1" >Set the local and remote volume of all background music</td>
|
|
134
|
+
</tr>
|
|
135
|
+
|
|
136
|
+
<tr>
|
|
137
|
+
<td rowspan="1" colSpan="1" >[setMusicPublishVolume](https://write.woa.com/document/87030074293530624)</td>
|
|
138
|
+
|
|
139
|
+
<td rowspan="1" colSpan="1" >Set the remote volume of a specific background music track</td>
|
|
140
|
+
</tr>
|
|
141
|
+
|
|
142
|
+
<tr>
|
|
143
|
+
<td rowspan="1" colSpan="1" >[setMusicPlayoutVolume](https://write.woa.com/document/87030074293530624)</td>
|
|
144
|
+
|
|
145
|
+
<td rowspan="1" colSpan="1" >Set the local volume of a specific background music track</td>
|
|
146
|
+
</tr>
|
|
147
|
+
|
|
148
|
+
<tr>
|
|
149
|
+
<td rowspan="1" colSpan="1" >[setMusicPitch](https://write.woa.com/document/87030074293530624)</td>
|
|
150
|
+
|
|
151
|
+
<td rowspan="1" colSpan="1" >Adjust the pitch of background music</td>
|
|
152
|
+
</tr>
|
|
153
|
+
|
|
154
|
+
<tr>
|
|
155
|
+
<td rowspan="1" colSpan="1" >[setMusicSpeedRate](https://write.woa.com/document/87030074293530624)</td>
|
|
156
|
+
|
|
157
|
+
<td rowspan="1" colSpan="1" >Adjust the variable speed effect of background music</td>
|
|
158
|
+
</tr>
|
|
159
|
+
|
|
160
|
+
<tr>
|
|
161
|
+
<td rowspan="1" colSpan="1" >[getMusicCurrentPosInMS](https://write.woa.com/document/87030074293530624)</td>
|
|
162
|
+
|
|
163
|
+
<td rowspan="1" colSpan="1" >Get the playback progress of background music (unit: milliseconds)</td>
|
|
164
|
+
</tr>
|
|
165
|
+
|
|
166
|
+
<tr>
|
|
167
|
+
<td rowspan="1" colSpan="1" >[getMusicDurationInMS](https://write.woa.com/document/87030074293530624)</td>
|
|
168
|
+
|
|
169
|
+
<td rowspan="1" colSpan="1" >Get the total duration of background music (unit: milliseconds)</td>
|
|
170
|
+
</tr>
|
|
171
|
+
|
|
172
|
+
<tr>
|
|
173
|
+
<td rowspan="1" colSpan="1" >[seekMusicToPosInTime](https://write.woa.com/document/87030074293530624)</td>
|
|
174
|
+
|
|
175
|
+
<td rowspan="1" colSpan="1" >Set the playback progress of background music (unit: milliseconds)</td>
|
|
176
|
+
</tr>
|
|
177
|
+
|
|
178
|
+
<tr>
|
|
179
|
+
<td rowspan="1" colSpan="1" >[setMusicScratchSpeedRate](https://write.woa.com/document/87030074293530624)</td>
|
|
180
|
+
|
|
181
|
+
<td rowspan="1" colSpan="1" >Adjust the variable speed effect of scratching</td>
|
|
182
|
+
</tr>
|
|
183
|
+
|
|
184
|
+
<tr>
|
|
185
|
+
<td rowspan="1" colSpan="1" >[setPreloadObserver](https://write.woa.com/document/87030074293530624)</td>
|
|
186
|
+
|
|
187
|
+
<td rowspan="1" colSpan="1" >Set the preloading event callback</td>
|
|
188
|
+
</tr>
|
|
189
|
+
|
|
190
|
+
<tr>
|
|
191
|
+
<td rowspan="1" colSpan="1" >[preloadMusic](https://write.woa.com/document/87030074293530624)</td>
|
|
192
|
+
|
|
193
|
+
<td rowspan="1" colSpan="1" >Preload background music</td>
|
|
194
|
+
</tr>
|
|
195
|
+
|
|
196
|
+
<tr>
|
|
197
|
+
<td rowspan="1" colSpan="1" >[getMusicTrackCount](https://write.woa.com/document/87030074293530624)</td>
|
|
198
|
+
|
|
199
|
+
<td rowspan="1" colSpan="1" >Obtain the number of background music tracks</td>
|
|
200
|
+
</tr>
|
|
201
|
+
|
|
202
|
+
<tr>
|
|
203
|
+
<td rowspan="1" colSpan="1" >[setMusicTrack](https://write.woa.com/document/87030074293530624)</td>
|
|
204
|
+
|
|
205
|
+
<td rowspan="1" colSpan="1" >Specify the playback track of background music</td>
|
|
206
|
+
</tr>
|
|
207
|
+
</table>
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## Struct Type
|
|
211
|
+
<table>
|
|
212
|
+
<tr>
|
|
213
|
+
<td rowspan="1" colSpan="1" >Function List</td>
|
|
214
|
+
|
|
215
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
216
|
+
</tr>
|
|
217
|
+
|
|
218
|
+
<tr>
|
|
219
|
+
<td rowspan="1" colSpan="1" >[AudioMusicParam](https://write.woa.com/document/87030074293530624)</td>
|
|
220
|
+
|
|
221
|
+
<td rowspan="1" colSpan="1" >Playback control information for background music</td>
|
|
222
|
+
</tr>
|
|
223
|
+
</table>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
## Enumeration Types
|
|
227
|
+
<table>
|
|
228
|
+
<tr>
|
|
229
|
+
<td rowspan="1" colSpan="1" >Enumeration Types</td>
|
|
230
|
+
|
|
231
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
232
|
+
</tr>
|
|
233
|
+
|
|
234
|
+
<tr>
|
|
235
|
+
<td rowspan="1" colSpan="1" >[TXVoiceReverbType](https://write.woa.com/document/87030074293530624)</td>
|
|
236
|
+
|
|
237
|
+
<td rowspan="1" colSpan="1" >Reverb effects</td>
|
|
238
|
+
</tr>
|
|
239
|
+
|
|
240
|
+
<tr>
|
|
241
|
+
<td rowspan="1" colSpan="1" >[TXVoiceChangerType](https://write.woa.com/document/87030074293530624)</td>
|
|
242
|
+
|
|
243
|
+
<td rowspan="1" colSpan="1" >Voice changing effects</td>
|
|
244
|
+
</tr>
|
|
245
|
+
</table>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
## onLoadProgress
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
#### Background music preloading progress
|
|
253
|
+
|
|
254
|
+
## onLoadError
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
#### Error in background music preloading
|
|
259
|
+
<table>
|
|
260
|
+
<tr>
|
|
261
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
262
|
+
|
|
263
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
264
|
+
</tr>
|
|
265
|
+
|
|
266
|
+
<tr>
|
|
267
|
+
<td rowspan="1" colSpan="1" >errorCode</td>
|
|
268
|
+
|
|
269
|
+
<td rowspan="1" colSpan="1" >-4001: Failed to open file due to invalid audio data or FFmpeg protocol not found, etc.; -4002: Decoding failed due to corrupted audio file or inaccessible network audio file server, etc.; -4003: Preloading quantity exceeds the limit. Please call stopPlayMusic to release unused preloads first; -4005: Failed to open file due to invalid path. Please check if your path parameter points to a valid music file; -4006: Failed to open file due to illegal URL. Please check if the URL provided can download the expected music file using a browser; -4007: Failed to open file due to no audio stream. Please confirm if the file you provided is a legal audio file and whether it is damaged; -4008: Failed to open file due to unsupported format. Please confirm if the file format you provided is supported. Supported formats on mobile are [mp3, aac, m4a, wav, ogg, mp4, mkv], and supported formats on desktop are [mp3, aac, m4a, wav, mp4, mkv].</td>
|
|
270
|
+
</tr>
|
|
271
|
+
</table>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
## onStart
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
#### Start playing background music
|
|
279
|
+
|
|
280
|
+
Called when background music starts playing successfully or fails to play.
|
|
281
|
+
<table>
|
|
282
|
+
<tr>
|
|
283
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
284
|
+
|
|
285
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
286
|
+
</tr>
|
|
287
|
+
|
|
288
|
+
<tr>
|
|
289
|
+
<td rowspan="1" colSpan="1" >errCode</td>
|
|
290
|
+
|
|
291
|
+
<td rowspan="1" colSpan="1" >Error Code. 0: Play started successfully; -4001: Failed to open file, such as invalid audio data, FFMPEG protocol not found, etc.; -4005: Invalid path, check if the provided path points to a valid music file; -4006: Invalid URL, check in the browser if the provided URL can download the expected music file; -4007: No audio stream, confirm if the provided file is a valid audio file and is not corrupted; -4008: Unsupported format, verify if the provided file is in a supported format. Mobile supports [mp3, aac, m4a, wav, ogg, mp4, mkv], desktop supports [mp3, aac, m4a, wav, mp4, mkv].</td>
|
|
292
|
+
</tr>
|
|
293
|
+
|
|
294
|
+
<tr>
|
|
295
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
296
|
+
|
|
297
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
298
|
+
</tr>
|
|
299
|
+
</table>
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
## onPlayProgress
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
#### Background music playback progress
|
|
307
|
+
|
|
308
|
+
## onComplete
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
#### Background music playback completed
|
|
313
|
+
|
|
314
|
+
Called when background music finishes playing or encounters an error.
|
|
315
|
+
<table>
|
|
316
|
+
<tr>
|
|
317
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
318
|
+
|
|
319
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
320
|
+
</tr>
|
|
321
|
+
|
|
322
|
+
<tr>
|
|
323
|
+
<td rowspan="1" colSpan="1" >errCode</td>
|
|
324
|
+
|
|
325
|
+
<td rowspan="1" colSpan="1" >Error Code. 0: Play ended; -4002: Decoding failed, such as corrupted audio file, or unreachable network audio file server.</td>
|
|
326
|
+
</tr>
|
|
327
|
+
|
|
328
|
+
<tr>
|
|
329
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
330
|
+
|
|
331
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
332
|
+
</tr>
|
|
333
|
+
</table>
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
## enableVoiceEarMonitor
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
#### Enable ear return
|
|
341
|
+
|
|
342
|
+
After the host enables ear return, they can hear their own voice collected by the microphone in the headphones. This effect is suitable for scenarios where the host is singing.
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
It should be noted that due to the high hardware latency of Bluetooth headphones, this effect cannot be enabled when the host is wearing Bluetooth headphones. Please try to prompt the host to wear wired headphones in the user interface.
|
|
347
|
+
|
|
348
|
+
Also, please note that not all mobile phones can achieve excellent ear return effects after enabling this feature. We have blocked this effect for phones with poor ear return performance.
|
|
349
|
+
<table>
|
|
350
|
+
<tr>
|
|
351
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
352
|
+
|
|
353
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
354
|
+
</tr>
|
|
355
|
+
|
|
356
|
+
<tr>
|
|
357
|
+
<td rowspan="1" colSpan="1" >enable</td>
|
|
358
|
+
|
|
359
|
+
<td rowspan="1" colSpan="1" >true: on; false: off.</td>
|
|
360
|
+
</tr>
|
|
361
|
+
</table>
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
> **Note**
|
|
365
|
+
>
|
|
366
|
+
|
|
367
|
+
> This effect can only be enabled when the host is wearing headphones. Please also prompt the host to wear wired headphones.
|
|
368
|
+
>
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
## setVoiceEarMonitorVolume
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
#### Set ear return volume
|
|
376
|
+
|
|
377
|
+
Through this interface, you can set the volume of the sound in the ear return effect.
|
|
378
|
+
<table>
|
|
379
|
+
<tr>
|
|
380
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
381
|
+
|
|
382
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
383
|
+
</tr>
|
|
384
|
+
|
|
385
|
+
<tr>
|
|
386
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
387
|
+
|
|
388
|
+
<td rowspan="1" colSpan="1" >Volume. Value range: 0 - 100. Default value: 100.</td>
|
|
389
|
+
</tr>
|
|
390
|
+
</table>
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
> **Note**
|
|
394
|
+
>
|
|
395
|
+
|
|
396
|
+
> If you still feel the volume is too low after setting it to 100, you can set the maximum volume to 150. However, a volume above 100 carries a risk of pop noise, so proceed with caution.
|
|
397
|
+
>
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
## setVoiceReverbType
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
#### Set vocal reverb effect
|
|
405
|
+
|
|
406
|
+
Through this interface, you can set the vocal reverb effect. For specific effects, please refer to the enumeration Definition [TXVoiceReverbType](https://write.woa.com/document/87030074293530624).
|
|
407
|
+
|
|
408
|
+
> **Note**
|
|
409
|
+
>
|
|
410
|
+
|
|
411
|
+
> The set effect will automatically become invalid after leaving the room. If the corresponding effect is needed next time you enter the room, you need to call this interface to set it again.
|
|
412
|
+
>
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
## setVoiceChangerType
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
#### Set vocal voice changing effect
|
|
420
|
+
|
|
421
|
+
Through this interface, you can set the voice changing effect. For specific effects, please refer to the enumeration Definition [TXVoiceChangeType](https://write.woa.com/document/87030074293530624).
|
|
422
|
+
|
|
423
|
+
> **Note**
|
|
424
|
+
>
|
|
425
|
+
|
|
426
|
+
> The set effect will automatically become invalid after leaving the room. If the corresponding effect is needed next time you enter the room, you need to call this interface to set it again.
|
|
427
|
+
>
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
## setVoiceCaptureVolume
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
#### Set speech volume
|
|
435
|
+
|
|
436
|
+
This interface allows you to set the voice volume. It is generally used in conjunction with the music volume setting interface [setAllMusicVolume](https://write.woa.com/document/87030074293530624), to balance the respective volumes of voice and music before mixing.
|
|
437
|
+
<table>
|
|
438
|
+
<tr>
|
|
439
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
440
|
+
|
|
441
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
442
|
+
</tr>
|
|
443
|
+
|
|
444
|
+
<tr>
|
|
445
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
446
|
+
|
|
447
|
+
<td rowspan="1" colSpan="1" >Volume. Value range: 0-100. Default value: 100.</td>
|
|
448
|
+
</tr>
|
|
449
|
+
</table>
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
> **Note**
|
|
453
|
+
>
|
|
454
|
+
|
|
455
|
+
> If you still feel the volume is too low after setting it to 100, you can set the maximum volume to 150. However, a volume above 100 carries a risk of pop noise, so proceed with caution.
|
|
456
|
+
>
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
## setVoicePitch
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
#### Set speech tone
|
|
464
|
+
|
|
465
|
+
This interface can set the voice pitch, achieving pitch change without speed variation.
|
|
466
|
+
<table>
|
|
467
|
+
<tr>
|
|
468
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
469
|
+
|
|
470
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
471
|
+
</tr>
|
|
472
|
+
|
|
473
|
+
<tr>
|
|
474
|
+
<td rowspan="1" colSpan="1" >pitch</td>
|
|
475
|
+
|
|
476
|
+
<td rowspan="1" colSpan="1" >Pitch, value range: -1.0f to 1.0f, default value: 0.0f.</td>
|
|
477
|
+
</tr>
|
|
478
|
+
</table>
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
## setMusicObserver
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
#### Set the event callback interface for background music
|
|
486
|
+
|
|
487
|
+
Ensure to set the playback event callback using this API before playing the background music. This allows to be aware of the background music's playback progress.
|
|
488
|
+
<table>
|
|
489
|
+
<tr>
|
|
490
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
491
|
+
|
|
492
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
493
|
+
</tr>
|
|
494
|
+
|
|
495
|
+
<tr>
|
|
496
|
+
<td rowspan="1" colSpan="1" >musicId</td>
|
|
497
|
+
|
|
498
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
499
|
+
</tr>
|
|
500
|
+
|
|
501
|
+
<tr>
|
|
502
|
+
<td rowspan="1" colSpan="1" >observer</td>
|
|
503
|
+
|
|
504
|
+
<td rowspan="1" colSpan="1" >Refer to ITXMusicPlayObserver Definition interface for details.</td>
|
|
505
|
+
</tr>
|
|
506
|
+
</table>
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
> **Note**
|
|
510
|
+
>
|
|
511
|
+
|
|
512
|
+
> 1. If the ID does not need to be used, the observer can be set to NULL to completely release it.
|
|
513
|
+
>
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
## startPlayMusic
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
#### Start playing background music
|
|
521
|
+
|
|
522
|
+
Each piece of music requires a specific ID. With this ID, you can control the start, stop, volume, etc., of the music.
|
|
523
|
+
<table>
|
|
524
|
+
<tr>
|
|
525
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
526
|
+
|
|
527
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
528
|
+
</tr>
|
|
529
|
+
|
|
530
|
+
<tr>
|
|
531
|
+
<td rowspan="1" colSpan="1" >musicParam</td>
|
|
532
|
+
|
|
533
|
+
<td rowspan="1" colSpan="1" >Music parameters.</td>
|
|
534
|
+
</tr>
|
|
535
|
+
</table>
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
> **Note**
|
|
539
|
+
>
|
|
540
|
+
|
|
541
|
+
> 1. If you need to play the same background music multiple times, do not assign a new ID each time. We recommend using the same ID.
|
|
542
|
+
>
|
|
543
|
+
|
|
544
|
+
> 2. If you want to play different pieces of music simultaneously, assign different IDs for each piece.
|
|
545
|
+
>
|
|
546
|
+
|
|
547
|
+
> 3. If you use the same ID to play different music, the SDK will stop the old music before playing the new one.
|
|
548
|
+
>
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
## stopPlayMusic
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
|
|
555
|
+
#### Stop playing background music
|
|
556
|
+
<table>
|
|
557
|
+
<tr>
|
|
558
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
559
|
+
|
|
560
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
561
|
+
</tr>
|
|
562
|
+
|
|
563
|
+
<tr>
|
|
564
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
565
|
+
|
|
566
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
567
|
+
</tr>
|
|
568
|
+
</table>
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
## pausePlayMusic
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
|
|
575
|
+
#### Pause background music
|
|
576
|
+
<table>
|
|
577
|
+
<tr>
|
|
578
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
579
|
+
|
|
580
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
581
|
+
</tr>
|
|
582
|
+
|
|
583
|
+
<tr>
|
|
584
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
585
|
+
|
|
586
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
587
|
+
</tr>
|
|
588
|
+
</table>
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
## resumePlayMusic
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
#### Resume background music
|
|
596
|
+
<table>
|
|
597
|
+
<tr>
|
|
598
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
599
|
+
|
|
600
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
601
|
+
</tr>
|
|
602
|
+
|
|
603
|
+
<tr>
|
|
604
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
605
|
+
|
|
606
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
607
|
+
</tr>
|
|
608
|
+
</table>
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
## setAllMusicVolume
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
#### Set the local and remote volume of all background music
|
|
616
|
+
|
|
617
|
+
This interface allows you to set both the local and remote volume of all background music.
|
|
618
|
+
- Local Volume: The volume of background music that the host can hear locally.
|
|
619
|
+
|
|
620
|
+
- Remote Volume: The volume of background music that the audience can hear.
|
|
621
|
+
|
|
622
|
+
<table>
|
|
623
|
+
<tr>
|
|
624
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
625
|
+
|
|
626
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
627
|
+
</tr>
|
|
628
|
+
|
|
629
|
+
<tr>
|
|
630
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
631
|
+
|
|
632
|
+
<td rowspan="1" colSpan="1" >Volume range, value range is 0-100, default value: 60.</td>
|
|
633
|
+
</tr>
|
|
634
|
+
</table>
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
> **Note**
|
|
638
|
+
>
|
|
639
|
+
|
|
640
|
+
> If you still feel the volume is too low after setting it to 100, you can set the maximum volume to 150. However, a volume above 100 carries a risk of pop noise, so proceed with caution.
|
|
641
|
+
>
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
## setMusicPublishVolume
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
#### Set the remote volume of a specific background music track
|
|
649
|
+
|
|
650
|
+
This interface can finely control the remote volume for each background music track, which is the volume the audience can hear.
|
|
651
|
+
<table>
|
|
652
|
+
<tr>
|
|
653
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
654
|
+
|
|
655
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
656
|
+
</tr>
|
|
657
|
+
|
|
658
|
+
<tr>
|
|
659
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
660
|
+
|
|
661
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
662
|
+
</tr>
|
|
663
|
+
|
|
664
|
+
<tr>
|
|
665
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
666
|
+
|
|
667
|
+
<td rowspan="1" colSpan="1" >Volume range, value range is 0-100; default value: 60.</td>
|
|
668
|
+
</tr>
|
|
669
|
+
</table>
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
> **Note**
|
|
673
|
+
>
|
|
674
|
+
|
|
675
|
+
> If you still feel the volume is too low after setting it to 100, you can set the maximum volume to 150. However, a volume above 100 carries a risk of pop noise, so proceed with caution.
|
|
676
|
+
>
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
## setMusicPlayoutVolume
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
#### Set the local volume of a specific background music track
|
|
684
|
+
|
|
685
|
+
This interface can finely control the local volume for each background music track, which is the volume the host can hear locally.
|
|
686
|
+
<table>
|
|
687
|
+
<tr>
|
|
688
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
689
|
+
|
|
690
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
691
|
+
</tr>
|
|
692
|
+
|
|
693
|
+
<tr>
|
|
694
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
695
|
+
|
|
696
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
697
|
+
</tr>
|
|
698
|
+
|
|
699
|
+
<tr>
|
|
700
|
+
<td rowspan="1" colSpan="1" >volume</td>
|
|
701
|
+
|
|
702
|
+
<td rowspan="1" colSpan="1" >Volume range, value range is 0-100, default value: 60.</td>
|
|
703
|
+
</tr>
|
|
704
|
+
</table>
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
> **Note**
|
|
708
|
+
>
|
|
709
|
+
|
|
710
|
+
> If you still feel the volume is too low after setting it to 100, you can set the maximum volume to 150. However, a volume above 100 carries a risk of pop noise, so proceed with caution.
|
|
711
|
+
>
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
## setMusicPitch
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
#### Adjust the pitch of background music
|
|
719
|
+
<table>
|
|
720
|
+
<tr>
|
|
721
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
722
|
+
|
|
723
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
724
|
+
</tr>
|
|
725
|
+
|
|
726
|
+
<tr>
|
|
727
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
728
|
+
|
|
729
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
730
|
+
</tr>
|
|
731
|
+
|
|
732
|
+
<tr>
|
|
733
|
+
<td rowspan="1" colSpan="1" >pitch</td>
|
|
734
|
+
|
|
735
|
+
<td rowspan="1" colSpan="1" >Pitch, default value is 0.0f, value range is a floating point between [-1 ~ 1].</td>
|
|
736
|
+
</tr>
|
|
737
|
+
</table>
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
## setMusicSpeedRate
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
#### Adjust the variable speed effect of background music
|
|
745
|
+
<table>
|
|
746
|
+
<tr>
|
|
747
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
748
|
+
|
|
749
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
750
|
+
</tr>
|
|
751
|
+
|
|
752
|
+
<tr>
|
|
753
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
754
|
+
|
|
755
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
756
|
+
</tr>
|
|
757
|
+
|
|
758
|
+
<tr>
|
|
759
|
+
<td rowspan="1" colSpan="1" >speedRate</td>
|
|
760
|
+
|
|
761
|
+
<td rowspan="1" colSpan="1" >Speed, default value is 1.0f, value range is a floating point between [0.5 ~ 2].</td>
|
|
762
|
+
</tr>
|
|
763
|
+
</table>
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
## getMusicCurrentPosInMS
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
#### Get the playback progress of background music (unit: milliseconds)
|
|
771
|
+
<table>
|
|
772
|
+
<tr>
|
|
773
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
774
|
+
|
|
775
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
776
|
+
</tr>
|
|
777
|
+
|
|
778
|
+
<tr>
|
|
779
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
780
|
+
|
|
781
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
782
|
+
</tr>
|
|
783
|
+
</table>
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
#### Return value description:
|
|
787
|
+
|
|
788
|
+
On success, returns current playback time in milliseconds, on failure returns -1.
|
|
789
|
+
|
|
790
|
+
## getMusicDurationInMS
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
#### Get the total duration of background music (unit: milliseconds)
|
|
795
|
+
<table>
|
|
796
|
+
<tr>
|
|
797
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
798
|
+
|
|
799
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
800
|
+
</tr>
|
|
801
|
+
|
|
802
|
+
<tr>
|
|
803
|
+
<td rowspan="1" colSpan="1" >path</td>
|
|
804
|
+
|
|
805
|
+
<td rowspan="1" colSpan="1" >Music file path.</td>
|
|
806
|
+
</tr>
|
|
807
|
+
</table>
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
#### Return value description:
|
|
811
|
+
|
|
812
|
+
On success, returns duration, on failure returns -1.
|
|
813
|
+
|
|
814
|
+
## seekMusicToPosInTime
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
#### Set the playback progress of background music (unit: milliseconds)
|
|
819
|
+
<table>
|
|
820
|
+
<tr>
|
|
821
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
822
|
+
|
|
823
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
824
|
+
</tr>
|
|
825
|
+
|
|
826
|
+
<tr>
|
|
827
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
828
|
+
|
|
829
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
830
|
+
</tr>
|
|
831
|
+
|
|
832
|
+
<tr>
|
|
833
|
+
<td rowspan="1" colSpan="1" >pts</td>
|
|
834
|
+
|
|
835
|
+
<td rowspan="1" colSpan="1" >Unit: milliseconds.</td>
|
|
836
|
+
</tr>
|
|
837
|
+
</table>
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
> **Note**
|
|
841
|
+
>
|
|
842
|
+
|
|
843
|
+
> Please avoid calling this interface too frequently as it may read and write music files again, which can be time-consuming.
|
|
844
|
+
>
|
|
845
|
+
|
|
846
|
+
> Therefore, when users drag the playback progress bar of the music, please call this interface after the user completes the drag operation.
|
|
847
|
+
>
|
|
848
|
+
|
|
849
|
+
> Because the progress bar control on the UI often feeds back the user's drag progress at a high frequency, it would lead to a poor user experience without frequency limitations.
|
|
850
|
+
>
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
## setMusicScratchSpeedRate
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
#### Adjust the variable speed effect of scratching
|
|
858
|
+
<table>
|
|
859
|
+
<tr>
|
|
860
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
861
|
+
|
|
862
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
863
|
+
</tr>
|
|
864
|
+
|
|
865
|
+
<tr>
|
|
866
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
867
|
+
|
|
868
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
869
|
+
</tr>
|
|
870
|
+
|
|
871
|
+
<tr>
|
|
872
|
+
<td rowspan="1" colSpan="1" >scratchSpeedRate</td>
|
|
873
|
+
|
|
874
|
+
<td rowspan="1" colSpan="1" >Scratching speed, the default value is 1.0f, the range is a floating point number between [-12.0 ~ 12.0], the positive/negative value represents the forward/reverse direction, and the absolute value represents the speed.</td>
|
|
875
|
+
</tr>
|
|
876
|
+
</table>
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
> **Note**
|
|
880
|
+
>
|
|
881
|
+
|
|
882
|
+
> Precondition: preloadMusic is successful.
|
|
883
|
+
>
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
## setPreloadObserver
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
#### Set the preloading event callback
|
|
891
|
+
|
|
892
|
+
Set the callback using this API before preloading background music to monitor the preload progress.
|
|
893
|
+
<table>
|
|
894
|
+
<tr>
|
|
895
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
896
|
+
|
|
897
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
898
|
+
</tr>
|
|
899
|
+
|
|
900
|
+
<tr>
|
|
901
|
+
<td rowspan="1" colSpan="1" >observer</td>
|
|
902
|
+
|
|
903
|
+
<td rowspan="1" colSpan="1" >Refer to ITXMusicPreloadObserver Definition interface for details.</td>
|
|
904
|
+
</tr>
|
|
905
|
+
</table>
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
## preloadMusic
|
|
909
|
+
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
#### Preload background music
|
|
913
|
+
|
|
914
|
+
Each piece of music requires a specific ID. With this ID, you can control the start, stop, volume, etc., of the music.
|
|
915
|
+
<table>
|
|
916
|
+
<tr>
|
|
917
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
918
|
+
|
|
919
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
920
|
+
</tr>
|
|
921
|
+
|
|
922
|
+
<tr>
|
|
923
|
+
<td rowspan="1" colSpan="1" >preloadParam</td>
|
|
924
|
+
|
|
925
|
+
<td rowspan="1" colSpan="1" >Preload music parameters.</td>
|
|
926
|
+
</tr>
|
|
927
|
+
</table>
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
> **Note**
|
|
931
|
+
>
|
|
932
|
+
|
|
933
|
+
> 1. Preloading supports up to 2 different IDs simultaneously, and the preload duration does not exceed 10 minutes. After use, stopPlayMusic must be called to prevent memory from not being released.
|
|
934
|
+
>
|
|
935
|
+
|
|
936
|
+
> 2. If the music corresponding to this ID is playing, preloading will fail. You need to call stopPlayMusic first.
|
|
937
|
+
>
|
|
938
|
+
|
|
939
|
+
> 3. When the musicParam is exactly the same as the musicParam passed to startPlayMusic, preloading is effective.
|
|
940
|
+
>
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
## getMusicTrackCount
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
#### Obtain the number of background music tracks
|
|
948
|
+
<table>
|
|
949
|
+
<tr>
|
|
950
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
951
|
+
|
|
952
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
953
|
+
</tr>
|
|
954
|
+
|
|
955
|
+
<tr>
|
|
956
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
957
|
+
|
|
958
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
959
|
+
</tr>
|
|
960
|
+
</table>
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
## setMusicTrack
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
#### Specify the playback track of background music
|
|
968
|
+
<table>
|
|
969
|
+
<tr>
|
|
970
|
+
<td rowspan="1" colSpan="1" >Parameters</td>
|
|
971
|
+
|
|
972
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
973
|
+
</tr>
|
|
974
|
+
|
|
975
|
+
<tr>
|
|
976
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
977
|
+
|
|
978
|
+
<td rowspan="1" colSpan="1" >Music ID.</td>
|
|
979
|
+
</tr>
|
|
980
|
+
|
|
981
|
+
<tr>
|
|
982
|
+
<td rowspan="1" colSpan="1" >index</td>
|
|
983
|
+
|
|
984
|
+
<td rowspan="1" colSpan="1" >By default, the first audio track is played. The range of values is [0, total number of tracks).</td>
|
|
985
|
+
</tr>
|
|
986
|
+
</table>
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
> **Note**
|
|
990
|
+
>
|
|
991
|
+
|
|
992
|
+
> The total number of tracks can be obtained through the getMusicTrackCount interface.
|
|
993
|
+
>
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
## TXVoiceReverbType
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
#### Reverb effects
|
|
1001
|
+
|
|
1002
|
+
Reverb effects can be applied to vocals, using acoustic algorithms to overlap the sound and simulate various immersive experiences in different environments. Currently, the following reverb effects are supported:
|
|
1003
|
+
|
|
1004
|
+
0:Off; 1:KTV; 2:Small Room; 3:Hall; 4:Deep; 5:Loud; 6:Metallic; 7:Magnetic; 8:Ethereal; 9:Studio; 10:Melodious; 11:Studio2.
|
|
1005
|
+
<table>
|
|
1006
|
+
<tr>
|
|
1007
|
+
<td rowspan="1" colSpan="1" >Enumeration</td>
|
|
1008
|
+
|
|
1009
|
+
<td rowspan="1" colSpan="1" >Value</td>
|
|
1010
|
+
|
|
1011
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
1012
|
+
</tr>
|
|
1013
|
+
|
|
1014
|
+
<tr>
|
|
1015
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_0</td>
|
|
1016
|
+
|
|
1017
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
1018
|
+
|
|
1019
|
+
<td rowspan="1" colSpan="1" >Turn off effects</td>
|
|
1020
|
+
</tr>
|
|
1021
|
+
|
|
1022
|
+
<tr>
|
|
1023
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_1</td>
|
|
1024
|
+
|
|
1025
|
+
<td rowspan="1" colSpan="1" >1</td>
|
|
1026
|
+
|
|
1027
|
+
<td rowspan="1" colSpan="1" >KTV</td>
|
|
1028
|
+
</tr>
|
|
1029
|
+
|
|
1030
|
+
<tr>
|
|
1031
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_2</td>
|
|
1032
|
+
|
|
1033
|
+
<td rowspan="1" colSpan="1" >2</td>
|
|
1034
|
+
|
|
1035
|
+
<td rowspan="1" colSpan="1" >Small Room</td>
|
|
1036
|
+
</tr>
|
|
1037
|
+
|
|
1038
|
+
<tr>
|
|
1039
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_3</td>
|
|
1040
|
+
|
|
1041
|
+
<td rowspan="1" colSpan="1" >3</td>
|
|
1042
|
+
|
|
1043
|
+
<td rowspan="1" colSpan="1" >Hall</td>
|
|
1044
|
+
</tr>
|
|
1045
|
+
|
|
1046
|
+
<tr>
|
|
1047
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_4</td>
|
|
1048
|
+
|
|
1049
|
+
<td rowspan="1" colSpan="1" >4</td>
|
|
1050
|
+
|
|
1051
|
+
<td rowspan="1" colSpan="1" >Low-pitched</td>
|
|
1052
|
+
</tr>
|
|
1053
|
+
|
|
1054
|
+
<tr>
|
|
1055
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_5</td>
|
|
1056
|
+
|
|
1057
|
+
<td rowspan="1" colSpan="1" >5</td>
|
|
1058
|
+
|
|
1059
|
+
<td rowspan="1" colSpan="1" >Loud</td>
|
|
1060
|
+
</tr>
|
|
1061
|
+
|
|
1062
|
+
<tr>
|
|
1063
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_6</td>
|
|
1064
|
+
|
|
1065
|
+
<td rowspan="1" colSpan="1" >6</td>
|
|
1066
|
+
|
|
1067
|
+
<td rowspan="1" colSpan="1" >Metallic sound</td>
|
|
1068
|
+
</tr>
|
|
1069
|
+
|
|
1070
|
+
<tr>
|
|
1071
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_7</td>
|
|
1072
|
+
|
|
1073
|
+
<td rowspan="1" colSpan="1" >7</td>
|
|
1074
|
+
|
|
1075
|
+
<td rowspan="1" colSpan="1" >Magnetic</td>
|
|
1076
|
+
</tr>
|
|
1077
|
+
|
|
1078
|
+
<tr>
|
|
1079
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_8</td>
|
|
1080
|
+
|
|
1081
|
+
<td rowspan="1" colSpan="1" >8</td>
|
|
1082
|
+
|
|
1083
|
+
<td rowspan="1" colSpan="1" >Ethereal voice</td>
|
|
1084
|
+
</tr>
|
|
1085
|
+
|
|
1086
|
+
<tr>
|
|
1087
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_9</td>
|
|
1088
|
+
|
|
1089
|
+
<td rowspan="1" colSpan="1" >9</td>
|
|
1090
|
+
|
|
1091
|
+
<td rowspan="1" colSpan="1" >Recording studio</td>
|
|
1092
|
+
</tr>
|
|
1093
|
+
|
|
1094
|
+
<tr>
|
|
1095
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_10</td>
|
|
1096
|
+
|
|
1097
|
+
<td rowspan="1" colSpan="1" >10</td>
|
|
1098
|
+
|
|
1099
|
+
<td rowspan="1" colSpan="1" >Melodious</td>
|
|
1100
|
+
</tr>
|
|
1101
|
+
|
|
1102
|
+
<tr>
|
|
1103
|
+
<td rowspan="1" colSpan="1" >TXLiveVoiceReverbType_11</td>
|
|
1104
|
+
|
|
1105
|
+
<td rowspan="1" colSpan="1" >11</td>
|
|
1106
|
+
|
|
1107
|
+
<td rowspan="1" colSpan="1" >Recording studio 2</td>
|
|
1108
|
+
</tr>
|
|
1109
|
+
</table>
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
## TXVoiceChangeType
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
#### Voice changing effects
|
|
1117
|
+
|
|
1118
|
+
Voice changing effect can be applied to vocals. By using acoustic algorithms for secondary processing, the voice can acquire a different sound quality from the original. Currently, the following voice changing effects are supported:
|
|
1119
|
+
|
|
1120
|
+
0: Off; 1: Naughty kid; 2: Lolita; 3: Uncle; 4: Heavy metal; 5: Cold; 6: Foreign accent; 7: Trapped beast; 8: Fat nerd; 9: Strong current; 10: Heavy machinery; 11: Ethereal.
|
|
1121
|
+
<table>
|
|
1122
|
+
<tr>
|
|
1123
|
+
<td rowspan="1" colSpan="1" >Enumeration</td>
|
|
1124
|
+
|
|
1125
|
+
<td rowspan="1" colSpan="1" >Value</td>
|
|
1126
|
+
|
|
1127
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
1128
|
+
</tr>
|
|
1129
|
+
|
|
1130
|
+
<tr>
|
|
1131
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_0</td>
|
|
1132
|
+
|
|
1133
|
+
<td rowspan="1" colSpan="1" >0</td>
|
|
1134
|
+
|
|
1135
|
+
<td rowspan="1" colSpan="1" >Off</td>
|
|
1136
|
+
</tr>
|
|
1137
|
+
|
|
1138
|
+
<tr>
|
|
1139
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_1</td>
|
|
1140
|
+
|
|
1141
|
+
<td rowspan="1" colSpan="1" >1</td>
|
|
1142
|
+
|
|
1143
|
+
<td rowspan="1" colSpan="1" >Naughty kid</td>
|
|
1144
|
+
</tr>
|
|
1145
|
+
|
|
1146
|
+
<tr>
|
|
1147
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_2</td>
|
|
1148
|
+
|
|
1149
|
+
<td rowspan="1" colSpan="1" >2</td>
|
|
1150
|
+
|
|
1151
|
+
<td rowspan="1" colSpan="1" >Lolita</td>
|
|
1152
|
+
</tr>
|
|
1153
|
+
|
|
1154
|
+
<tr>
|
|
1155
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_3</td>
|
|
1156
|
+
|
|
1157
|
+
<td rowspan="1" colSpan="1" >3</td>
|
|
1158
|
+
|
|
1159
|
+
<td rowspan="1" colSpan="1" >Uncle</td>
|
|
1160
|
+
</tr>
|
|
1161
|
+
|
|
1162
|
+
<tr>
|
|
1163
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_4</td>
|
|
1164
|
+
|
|
1165
|
+
<td rowspan="1" colSpan="1" >4</td>
|
|
1166
|
+
|
|
1167
|
+
<td rowspan="1" colSpan="1" >Heavy metal</td>
|
|
1168
|
+
</tr>
|
|
1169
|
+
|
|
1170
|
+
<tr>
|
|
1171
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_5</td>
|
|
1172
|
+
|
|
1173
|
+
<td rowspan="1" colSpan="1" >5</td>
|
|
1174
|
+
|
|
1175
|
+
<td rowspan="1" colSpan="1" >Cold</td>
|
|
1176
|
+
</tr>
|
|
1177
|
+
|
|
1178
|
+
<tr>
|
|
1179
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_6</td>
|
|
1180
|
+
|
|
1181
|
+
<td rowspan="1" colSpan="1" >6</td>
|
|
1182
|
+
|
|
1183
|
+
<td rowspan="1" colSpan="1" >Foreign accent</td>
|
|
1184
|
+
</tr>
|
|
1185
|
+
|
|
1186
|
+
<tr>
|
|
1187
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_7</td>
|
|
1188
|
+
|
|
1189
|
+
<td rowspan="1" colSpan="1" >7</td>
|
|
1190
|
+
|
|
1191
|
+
<td rowspan="1" colSpan="1" >Trapped beast</td>
|
|
1192
|
+
</tr>
|
|
1193
|
+
|
|
1194
|
+
<tr>
|
|
1195
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_8</td>
|
|
1196
|
+
|
|
1197
|
+
<td rowspan="1" colSpan="1" >8</td>
|
|
1198
|
+
|
|
1199
|
+
<td rowspan="1" colSpan="1" >Otaku</td>
|
|
1200
|
+
</tr>
|
|
1201
|
+
|
|
1202
|
+
<tr>
|
|
1203
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_9</td>
|
|
1204
|
+
|
|
1205
|
+
<td rowspan="1" colSpan="1" >9</td>
|
|
1206
|
+
|
|
1207
|
+
<td rowspan="1" colSpan="1" >Strong electric current</td>
|
|
1208
|
+
</tr>
|
|
1209
|
+
|
|
1210
|
+
<tr>
|
|
1211
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_10</td>
|
|
1212
|
+
|
|
1213
|
+
<td rowspan="1" colSpan="1" >10</td>
|
|
1214
|
+
|
|
1215
|
+
<td rowspan="1" colSpan="1" >Heavy Machinery</td>
|
|
1216
|
+
</tr>
|
|
1217
|
+
|
|
1218
|
+
<tr>
|
|
1219
|
+
<td rowspan="1" colSpan="1" >TXVoiceChangerType_11</td>
|
|
1220
|
+
|
|
1221
|
+
<td rowspan="1" colSpan="1" >11</td>
|
|
1222
|
+
|
|
1223
|
+
<td rowspan="1" colSpan="1" >Ethereal voice</td>
|
|
1224
|
+
</tr>
|
|
1225
|
+
</table>
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
## TXAudioMusicParam
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
|
|
1232
|
+
#### Playback control information for background music
|
|
1233
|
+
|
|
1234
|
+
This information is used to specify background music details in the interface [startPlayMusic](https://write.woa.com/document/87030074293530624), including play ID, file path, loop count, etc.:
|
|
1235
|
+
|
|
1236
|
+
1. If you need to play the same background music multiple times, do not assign a new ID each time. We recommend using the same ID.
|
|
1237
|
+
|
|
1238
|
+
2. If you want to play different pieces of music simultaneously, assign different IDs for each piece.
|
|
1239
|
+
|
|
1240
|
+
3. If you use the same ID to play different music, the SDK will stop the old music before playing the new one.
|
|
1241
|
+
<table>
|
|
1242
|
+
<tr>
|
|
1243
|
+
<td rowspan="1" colSpan="1" >Enumeration Types</td>
|
|
1244
|
+
|
|
1245
|
+
<td rowspan="1" colSpan="1" >Description</td>
|
|
1246
|
+
</tr>
|
|
1247
|
+
|
|
1248
|
+
<tr>
|
|
1249
|
+
<td rowspan="1" colSpan="1" >endTimeMS</td>
|
|
1250
|
+
|
|
1251
|
+
<td rowspan="1" colSpan="1" >[Field Meaning] Music play end time, in milliseconds. 0 means play until the end of the file.</td>
|
|
1252
|
+
</tr>
|
|
1253
|
+
|
|
1254
|
+
<tr>
|
|
1255
|
+
<td rowspan="1" colSpan="1" >id</td>
|
|
1256
|
+
|
|
1257
|
+
<td rowspan="1" colSpan="1" >[Field Meaning] Music ID.<br>[Special Instructions] The SDK allows playing multiple music tracks simultaneously, so IDs are needed to control start, stop, volume, etc.</td>
|
|
1258
|
+
</tr>
|
|
1259
|
+
|
|
1260
|
+
<tr>
|
|
1261
|
+
<td rowspan="1" colSpan="1" >isShortFile</td>
|
|
1262
|
+
|
|
1263
|
+
<td rowspan="1" colSpan="1" >[Field Meaning] Whether the played file is a short music file.<br>[Recommended Value] true: Requires repeating short music file; false: Normal music file. Default: false.</td>
|
|
1264
|
+
</tr>
|
|
1265
|
+
|
|
1266
|
+
<tr>
|
|
1267
|
+
<td rowspan="1" colSpan="1" >loopCount</td>
|
|
1268
|
+
|
|
1269
|
+
<td rowspan="1" colSpan="1" >[Field Meaning] The number of times the music loops.<br>[Recommended Value] Value range is 0 to any positive integer. Default: 0. 0 means play the music once; 1 means play the music twice; and so on.</td>
|
|
1270
|
+
</tr>
|
|
1271
|
+
|
|
1272
|
+
<tr>
|
|
1273
|
+
<td rowspan="1" colSpan="1" >path</td>
|
|
1274
|
+
|
|
1275
|
+
<td rowspan="1" colSpan="1" >[Field Meaning] The full path or URL of the audio file. Supported audio formats include MP3, AAC, M4A, WAV.</td>
|
|
1276
|
+
</tr>
|
|
1277
|
+
|
|
1278
|
+
<tr>
|
|
1279
|
+
<td rowspan="1" colSpan="1" >publish</td>
|
|
1280
|
+
|
|
1281
|
+
<td rowspan="1" colSpan="1" >[Field Meaning] Whether to transmit the music to the remote end.<br>[Recommended Value] true: Music can be heard by remote users while playing locally; false: Only the host can hear the music locally, remote audience cannot hear it. Default: false.</td>
|
|
1282
|
+
</tr>
|
|
1283
|
+
|
|
1284
|
+
<tr>
|
|
1285
|
+
<td rowspan="1" colSpan="1" >startTimeMS</td>
|
|
1286
|
+
|
|
1287
|
+
<td rowspan="1" colSpan="1" >[Field Meaning] Music start time, in milliseconds.</td>
|
|
1288
|
+
</tr>
|
|
1289
|
+
</table>
|