playAllEffects abstract method
Plays all audio effect files.
After calling preloadEffect multiple times to preload multiple audio effect files, you can call this method to play all preloaded audio effect files.
loopCountNumber of times the audio effect file is looped: -1: Loops indefinitely until stopEffect or stopAllEffects is called. 0: Plays once. 1: Plays twice.pitchPitch of the audio effect. Value range is0.5,2.0. Default is 1.0, which represents the original pitch. The smaller the value, the lower the pitch.panSpatial position of the audio effect. Value range is-1.0,1.0: -1.0: Audio effect appears on the left. 0: Audio effect appears in the center. 1.0: Audio effect appears on the right.gainVolume of the audio effect. Value range is0,100. 100 is the default and represents the original volume. The smaller the value, the lower the volume.publishWhether to publish the audio effect to remote users: true : Publishes the audio effect to remote users. Both local and remote users can hear it. false : (Default) Does not publish the audio effect to remote users. Only local users can hear it.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.
Implementation
Future<void> playAllEffects(
{required int loopCount,
required double pitch,
required double pan,
required int gain,
bool publish = false});