onCaptureMixedAudioFrame method
@detail callback
@brief Return the mixed audio data of the data recorded by local microphone and the audio data of MediaPlayer and EffectPlayer.
@param audioFrame Mixed audio data, see ByteRTCAudioFrame{@link #ByteRTCAudioFrame}
Implementation
FutureOr<void> onCaptureMixedAudioFrame(dynamic audioFrame) async {
if ($instance == null || $instance is! IAudioFrameObserver) {
return;
}
return ($instance as IAudioFrameObserver).onCaptureMixedAudioFrame?.call(
packObject(
audioFrame,
() => AudioFrame.fromMap(AudioFrame.deepPackedMapValues(
AudioFrame.mapMemberToConstructorParams(audioFrame)))));
}