ios_enableAGC method

Future<int?> ios_enableAGC(
  1. BOOL enable
)

@platform ios @hidden(iOS) @valid since 3.51 @detail api @author liuchuang @brief 打开/关闭 AGC(Analog Automatic Gain Control)模拟自动增益控制功能。
开启该功能后,SDK 会自动调节麦克风的采集音量,确保音量稳定。 @param enable 是否打开 AGC 功能:
- true: 打开 AGC 功能。 - false: 关闭 AGC 功能。 @return - 0: 调用成功。 - -1: 调用失败。 @note 该方法在进房前后均可调用。如果你需要在进房前使用 AGC 功能,请联系技术支持获得私有参数,传入对应 ByteRTCRoomProfile{@link #ByteRTCRoomProfile} 。
要想在进房后开启 AGC 功能,你需要把 ByteRTCRoomProfile{@link #ByteRTCRoomProfile} 设为 ByteRTCRoomProfileMeetingByteRTCRoomProfileMeetingRoomByteRTCRoomProfileClassroom
AGC 功能生效后,不建议再调用 setAudioCaptureDeviceVolume: 来调节设备麦克风的采集音量。

Implementation

Future<int?> ios_enableAGC(BOOL enable) async {
  $() => ($instance as $p_i.ByteRTCEngine).enableAGC(enable);

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