How does one record audio using iOS? Not the input recording from the microphone, but I want to be able to capture/record the current playing audio within my app?
So, e.g. I start a recording session, and any sound that plays within my app only, I want to record it to a file?
I have done research on this but I am confused with what to use as it looks like mixing audio frameworks can cause problems?
I just want to be able to capture and save the audio playing within my application.
If you're using an iPhone with a Home button, you'll need to swipe up from the bottom of the screen until 'Control Center' appears. To record internal audio, tap on the grey 'Record' icon; to ensure that any audio playing on the device is captured.
Run the voice recorder app on your iPhone or iPad. Tap the More Menu (three vertical dots), you can then find the option Start Recording at the Scheduled Time. And then touch the Record button at the bottom left to firstly choose Start Time, then press Continue to to choose End Time. Finally press Record button.
Well if you're looking to just record the audio that YOUR app produces, then yes this is very much possible.
What isn't possible, is recording all audio that is output through the speaker. (EDIT: I just want to clarify that there is no way to record audio output produced by other applications. You can only record the audio samples that YOU produce).
If you want to record your app's audio output, you must use the remote io audio unit (http://atastypixel.com/blog/using-remoteio-audio-unit/).
All you would really need to do is copy the playback buffer after you fill it.
ex)
memcpy(void *dest, ioData->mBuffers[0].mData, int amount_of_bytes);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With