It would be nice to be able to record audio in other formats like mp4. Here's code that allows you to change the recording type. It would be great if the option could be added to the record call.
here's the code
Step 1: add this to the startRecordingAudio method on SDVSound.m before audioFile.recorder =
NSDictionary *recordSettings = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey,
[NSNumber numberWithFloat:16000.0], AVSampleRateKey,
[NSNumber numberWithInt: 1], AVNumberOfChannelsKey,
Then I replaced:
audioFile.recorder = [[CDVAudioRecorder alloc] initWithURL:audioFile.resourceURL settings:nil error:&error]; // Default PCM recording
audioFile.recorder = [[CDVAudioRecorder alloc] initWithURL:audioFile.resourceURL settings:recordSettings error:&error];
This records directly in M4A, mono in a relatively low fi (16K) format. For my application, which is just capturing words, not music this is just what I needed.