Record AVAudioPlayer output using AVAudioRecorder

Kieran  picture Kieran · Jun 9, 2009 · Viewed 7.7k times · Source

In my app the user plays a sound by pressing a button. There are several buttons which can be played simultaneously. The sounds are played using AVAudioPlayer instances. I want to record the output of these instances using AVAudioRecorder. I have set it all up and a file is created and records but when I play it back it does not play any sound. It is just a silent file the length of the recording. Does anyone know if there is a setting I am missing with AVAudioPlayer or AVAudioRecorder? Thanks

Answer

Warewolf picture Warewolf · Dec 13, 2012

It is not possible to record AVAudioPlayer output as input to AVAudioRecorder for recording. You can use audio buffer to store played files and save it to a file.