setLoudness method
@detail api
@brief To call enableVocalInstrumentBalance:{@link #ByteRTCEngine#enableVocalInstrumentBalance} to adjust the volume of the mixed media file or the PCM audio data, you must pass in its original loudness through this API.
@param loudness Original loudness in lufs. The range is [-70.0, 0.0].
When the value is less than -70.0lufs, it will be adjusted to -70.0lufs by default, and if it is more than 0.0lufs, the loudness will not be equalized. The default value is 1.0lufs, which means no processing.
@return
- 0: Success.
- < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details.
@note
- Call this API only when audio is mixing.
- The API is valid for audio file and PCM data.
Implementation
FutureOr<int> setLoudness(float loudness) async {
return await nativeCall('setLoudness:', [loudness]);
}