onRecordAudioFrame property

(void Function(String channelId, AudioFrame audioFrame)?) onRecordAudioFrame
final

Gets the captured audio frame.

To ensure that the data format of captured audio frame is as expected, Agora recommends that you set the audio data format as follows: After calling setRecordingAudioFrameParameters to set the audio data format, call registerAudioFrameObserver to register the audio observer object, the SDK will calculate the sampling interval according to the parameters set in this method, and triggers the onRecordAudioFrame callback according to the sampling interval. Due to framework limitations, this callback does not support sending processed audio data back to the SDK.

  • audioFrame The raw audio data. See AudioFrame.
  • channelId The channel ID.

Implementation

final void Function(String channelId, AudioFrame audioFrame)?
    onRecordAudioFrame;