FuncList | DESC |
Enabling in-ear monitoring | |
Setting in-ear monitoring volume | |
Setting voice reverb effects | |
Setting voice changing effects | |
Setting speech volume | |
Setting speech pitch | |
Starting background music | |
Stopping background music | |
Pausing background music | |
Resuming background music | |
Setting the local and remote playback volume of background music | |
Setting the remote playback volume of a specific music track | |
Setting the local playback volume of a specific music track | |
Adjusting the pitch of background music | |
Changing the speed of background music | |
Getting the playback progress (ms) of background music | |
Getting the total length (ms) of background music | |
Setting the playback progress (ms) of background music | |
Adjust the speed change effect of the scratch disc | |
Preload background music | |
Get the number of tracks of background music | |
Specify the playback track of background music |
FuncList | DESC |
Background music playback information |
EnumType | DESC |
Reverb effects | |
Voice changing effects |
- (void)enableVoiceEarMonitor: | (BOOL)enable |
Param | DESC |
enable | YES: enable; NO : disable |
- (void)setVoiceEarMonitorVolume: | (NSInteger)volume |
Param | DESC |
volume | Volume. Value range: 0-100; default: 100 |
- (void)setVoiceReverbType: |
- (void)setVoiceChangerType: |
- (void)setVoiceVolume: | (NSInteger)volume |
Param | DESC |
volume | Volume. Value range: 0-100; default: 100 |
-(void)setVoicePitch: | (double)pitch |
Param | DESC |
pitch | Ptich,Value range: -1.0f~1.0f; default: 0.0f。 |
- (void)startPlayMusic: | |
onStart: | (TXAudioMusicStartBlock _Nullable)startBlock |
onProgress: | (TXAudioMusicProgressBlock _Nullable)progressBlock |
onComplete: | (TXAudioMusicCompleteBlock _Nullable)completeBlock |
Param | DESC |
completeBlock | Callback of ending music |
musicParam | Music parameter |
progressBlock | Callback of playback progress |
startBlock | Callback of starting music |
- (void)stopPlayMusic: | (int32_t)id |
Param | DESC |
id | Music ID |
- (void)pausePlayMusic: | (int32_t)id |
Param | DESC |
id | Music ID |
- (void)resumePlayMusic: | (int32_t)id |
Param | DESC |
id | Music ID |
- (void)setAllMusicVolume: | (NSInteger)volume |
Param | DESC |
volume | Volume. Value range: 0-100; default: 60 |
- (void)setMusicPublishVolume: | (int32_t)id |
volume: | (NSInteger)volume |
Param | DESC |
id | Music ID |
volume | Volume. Value range: 0-100; default: 60 |
- (void)setMusicPlayoutVolume: | (int32_t)id |
volume: | (NSInteger)volume |
Param | DESC |
id | Music ID |
volume | Volume. Value range: 0-100. default: 60 |
- (void)setMusicPitch: | (int32_t)id |
pitch: | (double)pitch |
Param | DESC |
id | Music ID |
pitch | Pitch. Value range: floating point numbers in the range of [-1, 1]; default: 0.0f |
- (void)setMusicSpeedRate: | (int32_t)id |
speedRate: | (double)speedRate |
Param | DESC |
id | Music ID |
speedRate | Music speed. Value range: floating point numbers in the range of [0.5, 2]; default: 1.0f |
- (NSInteger)getMusicCurrentPosInMS: | (int32_t)id |
Param | DESC |
id | Music ID |
- (NSInteger)getMusicDurationInMS: | (NSString *)path |
Param | DESC |
path | Path of the music file. |
- (void)seekMusicToPosInMS: | (int32_t)id |
pts: | (NSInteger)pts |
Param | DESC |
id | Music ID |
pts | Unit: millisecond |
- (void)setMusicScratchSpeedRate: | (int32_t)id |
speedRate: | (double)scratchSpeedRate |
Param | DESC |
id | Music ID |
scratchSpeedRate | Scratch disc speed, the default value is 1.0f, the range is: a floating point number between [-12.0 ~ 12.0], the positive/negative speed value indicates the direction is positive/negative, and the absolute value indicates the speed. |
- (void)preloadMusic: | |
onProgress: | (TXMusicPreloadProgressBlock _Nullable)progressBlock |
onError: | (TXMusicPreloadErrorBlock _Nullable)errorBlock |
Param | DESC |
musicParam | Music parameter |
- (NSInteger)getMusicTrackCount: | (int32_t)id |
Param | DESC |
id | Music ID |
- (void)setMusicTrack: | (int32_t)id |
track: | (NSInteger)track |
Param | DESC |
id | Music ID |
index | Specify which track to play (the first track is played by default). Value range [0, total number of tracks). |
Enum | Value | DESC |
TXVoiceReverbType_0 | 0 | disable |
TXVoiceReverbType_1 | 1 | KTV |
TXVoiceReverbType_2 | 2 | small room |
TXVoiceReverbType_3 | 3 | great hall |
TXVoiceReverbType_4 | 4 | deep voice |
TXVoiceReverbType_5 | 5 | loud voice |
TXVoiceReverbType_6 | 6 | metallic sound |
TXVoiceReverbType_7 | 7 | magnetic sound |
TXVoiceReverbType_8 | 8 | ethereal |
TXVoiceReverbType_9 | 9 | studio |
TXVoiceReverbType_10 | 10 | melodious |
TXVoiceReverbType_11 | 11 | studio2 |
Enum | Value | DESC |
TXVoiceChangeType_0 | 0 | disable |
TXVoiceChangeType_1 | 1 | naughty kid |
TXVoiceChangeType_2 | 2 | Lolita |
TXVoiceChangeType_3 | 3 | uncle |
TXVoiceChangeType_4 | 4 | heavy metal |
TXVoiceChangeType_5 | 5 | catch cold |
TXVoiceChangeType_6 | 6 | foreign accent |
TXVoiceChangeType_7 | 7 | caged animal trapped beast |
TXVoiceChangeType_8 | 8 | indoorsman |
TXVoiceChangeType_9 | 9 | strong current |
TXVoiceChangeType_10 | 10 | heavy machinery |
TXVoiceChangeType_11 | 11 | intangible |
EnumType | DESC |
ID | Field description: music IDNote the SDK supports playing multiple music tracks. IDs are used to distinguish different music tracks and control their start, end, volume, etc. |
endTimeMS | Field description: the point in time in milliseconds for ending music playback. 0 indicates that playback continues till the end of the music track. |
isShortFile | Field description: whether the music played is a short music track Valid values: YES : short music track that needs to be looped; NO (default): normal-length music track |
loopCount | Field description: number of times the music track is looped Valid values: 0 or any positive integer. 0 (default) indicates that the music is played once, 1 twice, and so on. |
path | Field description: absolute path of the music file or url.the mp3,aac,m4a,wav supported. |
publish | Field description: whether to send the music to remote users Valid values: YES : remote users can hear the music played locally; NO (default): only the local user can hear the music. |
startTimeMS | Field description: the point in time in milliseconds for starting music playback |
Was this page helpful?