setVolume abstract method

Future<int?> setVolume(
  1. int effectId, {
  2. required int volume,
})

Adjusts the volume level of a specified audio effect.

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]. 100 by default.

Return value:

  • 0: Success.
  • <0: Failure.

Notes: Call this API after RTCAudioEffectPlayer.start.

Implementation

Future<int?> setVolume(
  int effectId, {
  required int volume,
});