onProcessCapturedAudioDataAfterUsedHeadphoneMonitor method
void
onProcessCapturedAudioDataAfterUsedHeadphoneMonitor()
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 frames captured locally after used headphone monitor. Developers can modify the audio frame data, as well as the audio channels and sample rate. The timestamp can be used for data synchronization, such as lyrics, etc.
When to trigger: You need to call enableCustomAudioCaptureProcessingAfterHeadphoneMonitor to enable the function first, and call startPreview 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.
dataAudio data in PCM formatdataLengthLength of the dataparamParameters of the audio frametimestampThe audio frame timestamp, starting from 0 when capture is started, the unit is milliseconds.
Implementation
void onProcessCapturedAudioDataAfterUsedHeadphoneMonitor(
Uint8List data,
int dataLength,
ZegoAudioFrameParam param,
double timestamp,
) {}