pullAudioFrame abstract method

Future<void> pullAudioFrame(
  1. AudioFrame frame
)

Pulls remote audio data.

After calling this method, the app actively pulls the decoded and mixed remote audio data for playback. This method and the onPlaybackAudioFrame callback can both be used to get the mixed remote audio playback data. After calling setExternalAudioSink to enable external audio rendering, the app can no longer get data from the onPlaybackAudioFrame callback. Therefore, choose between this method and the onPlaybackAudioFrame callback based on your actual business needs. The processing mechanisms differ, with the following distinctions: After calling this method, the app actively pulls the audio data. By setting the audio data, the SDK can adjust the buffer to help the app handle latency and effectively avoid audio playback jitter. After registering the onPlaybackAudioFrame callback, the SDK pushes the audio data to the app through the callback. When handling audio frame latency, the app may cause audio playback jitter. This method is only used to pull the mixed remote audio playback data. To obtain the captured raw audio data or the raw audio playback data of each stream before mixing, you can register the corresponding callback by calling registerAudioFrameObserver.

  • frame Pointer to AudioFrame.

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

Future<void> pullAudioFrame(AudioFrame frame);