onProcessCapturedAudioData property

(void Function(Uint8List data, int dataLength, ZegoAudioFrameParam param, double timestamp)?) onProcessCapturedAudioData
read / write

Custom audio processing local captured PCM audio frame callback.

Available: Since 2.13.0 Description: In this callback, you can receive PCM audio frames collected locally by custom audio processing. The returned timestamp can be used for data synchronization, such as lyrics, etc. The returned data cannot be modified. If you need the data after used headphone monitor, please use the onProcessCapturedAudioDataAfterUsedHeadphoneMonitor callback. When to trigger: You need to call enableCustomAudioCaptureProcessing to enable the function first, and call startPreivew or startPublishingStream to trigger this callback function. Restrictions: None. Caution: This callback is a high-frequency callback, please do not perform time-consuming operations in this callback.

  • data Audio data in PCM format.
  • dataLength Length of the data.
  • param Parameters of the audio frame.
  • timestamp The audio frame timestamp, starting from 0 when capture is started, the unit is milliseconds.

Implementation

static void Function(Uint8List data, int dataLength,
    ZegoAudioFrameParam param, double timestamp)? onProcessCapturedAudioData;