registerAudioFrameObserver

Registers an audio frame observer object.

void registerAudioFrameObserver(
      {required AudioPcmFrameSink observer,
      RawAudioFrameOpModeType mode =
          RawAudioFrameOpModeType.rawAudioFrameOpModeReadOnly});

Parameters

observer

The audio frame observer, reporting the reception of each audio frame. See AudioPcmFrameSink.

mode

The use mode of the audio frame. See RawAudioFrameOpModeType.

Returns

When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.