registerAudioFrameObserver abstract method

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

Registers an audio frame observer.

  • observer Audio frame observer that monitors the reception of each audio frame. See AudioPcmFrameSink.
  • mode Usage 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. See Error Codes for details and resolution suggestions.

Implementation

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