Public Member Functions | |
double | getEffectsVolume () |
int | setEffectsVolume (double volume) |
int | setVolumeOfEffect (int soundId, double volume) |
int | playEffect (int soundId, String filePath, int loop, double pitch, double pan, double gain) |
int | playEffect (int soundId, String filePath, int loopCount, double pitch, double pan, double gain, boolean publish) |
int | stopEffect (int soundId) |
int | stopAllEffects () |
int | preloadEffect (int soundId, String filePath) |
int | unloadEffect (int soundId) |
int | pauseEffect (int soundId) |
int | pauseAllEffects () |
int | resumeEffect (int soundId) |
int | resumeAllEffects () |
Provides the methods to manage the audio effects.
double io.agora.rtc.IAudioEffectManager.getEffectsVolume | ( | ) |
Gets the volume of the audio effects.
The value ranges between 0.0 and 100.0.
int io.agora.rtc.IAudioEffectManager.setEffectsVolume | ( | double | volume | ) |
Sets the volume of the audio effects.
volume | Volume of the audio effects. The value ranges between 0.0 and 100.0 (default). |
int io.agora.rtc.IAudioEffectManager.setVolumeOfEffect | ( | int | soundId, |
double | volume | ||
) |
Sets the volume of a specified audio effect.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
volume | Volume of the audio effect. The value ranges between 0.0 and 100.0 (default). |
int io.agora.rtc.IAudioEffectManager.playEffect | ( | int | soundId, |
String | filePath, | ||
int | loop, | ||
double | pitch, | ||
double | pan, | ||
double | gain | ||
) |
Plays a specified audio effect.
soundId | ID of the specified audio effect. Each audio effect has a unique ID. If the audio effect is preloaded into the memory through preloadEffect, ensure that the soundID value is set to the same value as in preloadEffect. |
filePath | Absolute file path of the audio effect file. |
loop | Set the number of times the audio effect loops:
|
pitch | Pitch of the audio effect. The value ranges between 0.5 and 2. The default value is 1 (no change to the pitch). The lower the value, the lower the pitch. |
pan | Spatial position of the audio effect. The value ranges between -1.0 and 1.0.
|
gain | Volume of the audio effect. The value ranges betwwen 0.0 and 100,0. The default value is 100.0. The lower the value, the lower the volume of the audio effect. |
int io.agora.rtc.IAudioEffectManager.playEffect | ( | int | soundId, |
String | filePath, | ||
int | loopCount, | ||
double | pitch, | ||
double | pan, | ||
double | gain, | ||
boolean | publish | ||
) |
Plays a specified audio effect.
When the audio effect file playback is finished, the onAudioEffectFinished callback will be triggered.
soundId | ID of the specified audio effect. Each audio effect has a unique ID. If you preloaded the audio effect into the memory through preloadEffect, ensure that the soundID value is set to the same value as in preloadEffect. |
filePath | Absolute file path of the audio effect file. |
loopCount | Sets the number of times the audio effect loops:
|
pitch | Sets the pitch of the audio effect. The value ranges between 0.5 and 2. The default value is 1 (no change to the pitch). The lower the value, the lower the pitch. |
pan | Sets the spatial position of the audio effect. The range is [-1.0, 1.0].
|
gain | Sets the volume of the audio effect. The range is [0.0, 100,0]. The default value is 100.0. The lower the value, the lower the volume of the audio effect. |
publish | Set whether or not to publish the specified audio effect to the remote stream:
|
int io.agora.rtc.IAudioEffectManager.stopEffect | ( | int | soundId | ) |
Stops playing a specified audio effect.
soundId | ID of the specified audio effect. Each audio effect has a unique ID. |
int io.agora.rtc.IAudioEffectManager.stopAllEffects | ( | ) |
Stops playing all audio effects.
int io.agora.rtc.IAudioEffectManager.preloadEffect | ( | int | soundId, |
String | filePath | ||
) |
Preloads a specified audio effect file into the memory.
Supported audio formats: mp3, aac, m4a, 3gp, wav.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
filePath | Absolute path of the audio effect file. |
int io.agora.rtc.IAudioEffectManager.unloadEffect | ( | int | soundId | ) |
Releases a specified preloaded audio effect from the memory.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
int io.agora.rtc.IAudioEffectManager.pauseEffect | ( | int | soundId | ) |
Pauses a specified audio effect.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
int io.agora.rtc.IAudioEffectManager.pauseAllEffects | ( | ) |
Pauses all audio effects.
int io.agora.rtc.IAudioEffectManager.resumeEffect | ( | int | soundId | ) |
Resumes playing a specified audio effect.
soundId | ID of the audio effect. Each audio effect has a unique ID. |
int io.agora.rtc.IAudioEffectManager.resumeAllEffects | ( | ) |
Resumes playing all audio effects.