Using AVAudioRecorder to record the output of the mainMixerNode of an AVAudioEngine instance

I am trying to use the

AVAudioRecorder
method to record the output of the
mainMixerNode
of an
AVAudioEngine
instance and save it to an MPEG4ACC file. From what I have been reading the default input to
AVAudioRecorder
is the microphone. I have everything setup so I can record to a file but how can I change the
AVAudioRecorder
input to be the
mainMixerNode
output?
Answered by fermor in 410410022
It seems like
AVAudioRecorder
only records from the microphone. The solution is to install a tap on the
mainMixerNode
. This tap provides an
AVAudioPCMBuffer
which can be written into an
AvAudioFile
which can be an MPEG4AAC file.
Accepted Answer
It seems like
AVAudioRecorder
only records from the microphone. The solution is to install a tap on the
mainMixerNode
. This tap provides an
AVAudioPCMBuffer
which can be written into an
AvAudioFile
which can be an MPEG4AAC file.
Using AVAudioRecorder to record the output of the mainMixerNode of an AVAudioEngine instance
 
 
Q