Technical Q&A QA1783

MTAudioProcessingTap - The Pre and Post effect MTAudioProcessingTapCreationFlags

Q:  MTAudioProcessingTapCreate allows you to pass in some MTAudioProcessingTapCreationFlags flags designating if you want the tap inserted Pre or Post Effect. What does this mean?

A: The MTAudioProcessingTap object is always used with a AVAudioMix object and its array of instances of AVAudioMixInputParameters. You associate a MTAudioProcessingTapRef with a track using the AVMutableAudioMixInputParameters audioTapProcessor property as shown in Figure 1.

Figure 1  MTAudioProcessingTap associated with AVAudioMixInputParameters.

When you create a "pre-effects" audio tap using the kMTAudioProcessingTapCreationFlag_PreEffects flag, the tap will be called before any effects specified by AVAudioMixInputParameters are applied; when you create a "post-effects" tap by using the kMTAudioProcessingTapCreationFlag_PostEffects flag, the tap will be called after those effects are applied. Currently the only "effect" that AVAudioMixInputParameters supports is a linear volume ramp.



Document Revision History


DateNotes
2013-03-11

New document that discusses the flags used when creating audio processing taps.