setVolumeAll method
@detail api
@brief Sets the volume of all audio effect, including audio effect files and PCM effects.
@param volume The ratio of the volume to the original volume in % with overflow protection. The range is [0, 400] and the recommended range is [0, 100].
@return
- 0: Success.
- < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details.
@note This API has a lower priority than setVolume{@link #IAudioEffectPlayer#setVolume}, i.e. the volume of the audio effect set by setVolume{@link #IAudioEffectPlayer#setVolume} is not affected by this API.
Implementation
Future<int?> setVolumeAll(int volume) async {
$a() => ($instance as $p_a.IAudioEffectPlayer).setVolumeAll(volume);
$i() => ($instance as $p_i.ByteRTCAudioEffectPlayer).setVolumeAll(volume);
if (Platform.isAndroid) {
return $a();
} else if (Platform.isIOS) {
return $i();
} else {
throw UnsupportedError(
'Not Support Platform ${Platform.operatingSystem}');
}
}