onProcessCapturedAudioDataAfterUsedHeadphoneMonitor property
getter/setter pair
Custom audio processing local captured PCM audio frame callback after used headphone monitor.
Available: Since 2.13.0
Description: In this callback, you can receive the PCM audio frame after the custom audio processing is locally collected and returned to the ear. The returned timestamp can be used for data synchronization, such as lyrics, etc. The returned data cannot be changed.
When to trigger: You need to call enableCustomAudioCaptureProcessingAfterHeadphoneMonitor
to enable the function first, and call startPreivew
or startPublishingStream
to trigger this callback function.
Caution: This callback is a high-frequency callback, please do not perform time-consuming operations in this callback.
data
Audio data in PCM formatdataLength
Length of the dataparam
Parameters of the audio frametimestamp
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)? onProcessCapturedAudioDataAfterUsedHeadphoneMonitor;