setCaptureVolume method

Future<int?> setCaptureVolume({
  1. required int volume,
})

@detail api @author huangshouqin @brief 调节音频采集音量 @param volume 采集的音量值和原始音量的百分比,范围是 0, 400,单位为 %,自带溢出保护。
只改变音频数据的音量信息,不涉及本端硬件的音量调节。
为保证更好的通话质量,建议将 volume 值设为 0,100
- 0:静音 - 100:原始音量 - 400: 最大可为原始音量的 4 倍(自带溢出保护) @return - 0: 调用成功。 - < 0 : 调用失败。查看 ReturnStatus{@link #ReturnStatus} 获得更多错误说明 @note 在开启音频采集前后,你都可以使用此接口设定采集音量。

Implementation

Future<int?> setCaptureVolume({required int volume}) async {
  $a() => ($instance as $p_a.RTCEngine).setCaptureVolume(volume);
  $i() => ($instance as $p_i.ByteRTCEngine).setCaptureVolume(volume);

  if (Platform.isAndroid) {
    return $a();
  } else if (Platform.isIOS) {
    return $i();
  } else {
    throw UnsupportedError(
        'Not Support Platform ${Platform.operatingSystem}');
  }
}