In my App, I want the user to be able to record one sound file and play it back, and then save the sound file for later. I used this tutorial to set up the play and record interface, but this tutorial leaves out a key part: how do I permanently save the sound to the disk?
Also, while you're here, how do I set a maximum time for the sound file to record? I don't want sound files exceeding 30 seconds in length.
Thanks, hopefully I can get this all sorted out.
Voice Record Demo is a great example to take a look at. It uses Cocos2D for the UI but if you just take a look at the HelloWorldScene.m class, it contains all the code you need to:
After you init your audio session, you could use a method like the one below to save an a recording to a given filename: