enableVocalInstrumentBalance method

Future<int?> enableVocalInstrumentBalance(
  1. bool enable
)

@detail api @author majun.lvhiei @brief Enables/disables the loudness equalization function.
If you call this API with the parameter set to True, the loudness of user's voice will be adjusted to -16lufs. If then you also call setAudioMixingLoudness and import the original loudness of the audio data used in audio mixing, the loudness will be adjusted to -20lufs when the audio data starts to play. @param enable Whether to enable loudness equalization function:
- true: Yes - false: No @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note You must call this API before starting to play the audio file with start{@link #IAudioEffectPlayer#start}.

Implementation

Future<int?> enableVocalInstrumentBalance(bool enable) async {
  $a() => ($instance as $p_a.RTCEngine).enableVocalInstrumentBalance(enable);
  $i() =>
      ($instance as $p_i.ByteRTCEngine).enableVocalInstrumentBalance(enable);

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