setPlaybackAudioFrameBeforeMixingParameters abstract method

Future<void> setPlaybackAudioFrameBeforeMixingParameters({
  1. required int sampleRate,
  2. required int channel,
})

Sets the format of the raw audio playback data before mixing.

The SDK triggers the onPlaybackAudioFrameBeforeMixing callback based on the sampling interval.

  • sampleRate The sample rate (Hz) of the audio data. You can set it to 8000, 16000, 32000, 44100, or 48000.
  • channel The number of audio channels. You can set it to 1 or 2: 1: Mono. 2: Stereo.
  • samplesPerCall Sets the number of audio samples returned in the onPlaybackAudioFrameBeforeMixing callback. In RTMP streaming scenarios, it is recommended to set this to 1024.

Returns This method returns no value if the call succeeds. If the method call fails, it throws an AgoraRtcException, which you need to catch and handle. See Error Codes for details and troubleshooting suggestions.

Implementation

Future<void> setPlaybackAudioFrameBeforeMixingParameters(
    {required int sampleRate, required int channel});