ios_enableAGC method
@platform ios
@hidden(iOS)
@valid since 3.51
@detail api
@author liuchuang
@brief Turns on/ off AGC(Analog Automatic Gain Control).
After AGC is enabled, SDK can automatically adjust mircrophone pickup volume to keep the output volume at a steady level.
@param enable whether to turn on AGC.
- true: AGC is turned on.
- false: AGC is turned off,with DAGC(Digtal Automatic Gain Control) still on.
@return
- 0: Success.
- -1: Failure.
@note
You can call this method before and after joining the room. To turn on AGC before joining the room, you need to contact the technical support to get a private parameter to set ByteRTCRoomProfile{@link #ByteRTCRoomProfile}.
To enable AGC after joining the room, you must set ByteRTCRoomProfile{@link #ByteRTCRoomProfile} to ByteRTCRoomProfileMeeting, ByteRTCRoomProfileMeetingRoom or ByteRTCRoomProfileClassroom.
It is not recommended to call setAudioCaptureDeviceVolume: to adjust mircrophone pickup volume with AGC on.
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}');
}
}