I have an AudioTapProcessor attached to AVPlayerItem.
which will call
static void tap_ProcessCallback(MTAudioProcessingTapRef tap, CMItemCount numberFrames, MTAudioP
OK, I've successfully resolved this problem.
The problem is I should not construct the AudioStreamBasicDescription
struct myself. But use the one provided by prepare callback of AudioProcessorTap
.
static void tap_PrepareCallback(MTAudioProcessingTapRef tap, CMItemCount maxFrames, const AudioStreamBasicDescription *processingFormat)
//retain this one