setCaptureVolume method
@detail api
@author huangshouqin
@brief Adjust the volume of the audio capture
@param volume Ratio of capture volume to original volume.
This changes the volume property of the audio data other than the hardware volume.
Ranging: 0,400. Unit: %
To ensure the audio quality, we recommend setting the volume to 100.
- 0: Mute
- 100: Original volume. To ensure the audio quality, we recommend 0, 100.
- 400: Four times the original volume with signal-clipping protection.
@return
- 0: Success.
- < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details
@note Call this API to set the volume of the audio capture before or during the audio capture.
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}');
}
}