setVolume method

FutureOr<int> setVolume(
  1. int effectId,
  2. int volume
)

@detail api @brief Adjusts the volume level of a specified audio effect, including audio effect file and PCM effect. @param effectId Audio effect ID @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 ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details. @note Call this API after start:filePath:config:{@link #ByteRTCAudioEffectPlayer#start:filePath:config}.

Implementation

FutureOr<int> setVolume(int effectId, int volume) async {
  return await nativeCall('setVolume:volume:', [effectId, volume]);
}