onCaptureMixedAudioFrame method
@detail callback
@author huanghao
@brief 返回本地麦克风录制的音频数据,本地 MediaPlayer / EffectPlayer 播放音频文件混音后的音频数据。
@param audioFrame 音频数据, 参看 IAudioFrame{@link #IAudioFrame}。
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)))));
}