Ok. I think I'm missing something here and I'm new to Core Audio but I have scoured the Apple documents and the rest of the web to no avail. I've also posted this same question to the apple dev forums and got no replies. I'm hoping the StackOverflow community can help me out.
I'm recording audio and playing it back just fine using AVAudioRecorder and AVAudioPlayer. My app also uses file sharing so the user can export the audio and play it elsewhere. This is where my issue comes in. I'm recording using AAC encoding but the file will not import into iTunes. It plays fine using VLC and looking at the media information its' codec is mp4a which I expected.
Reading on the web its sounding like the AAC needs a mp4a wrapper. Can anyone enlighten me or direct me to some info on this? Possibly an API or 3rd party library I can use?
I've played with the SpeakHere and ExtAudioFileConvertTest examples, added file sharing, recorded as AAC but they still won't play in iTunes.
Here's my recording code. Very grateful for any suggestions or guidance. Thanks!
NSDictionary *recordSettings = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithFloat: 44100.0], AVSampleRateKey,
[NSNumber numberWithInt: kAudioFormatMPEG4AAC], AVFormatIDKey,
[NSNumber numberWithInt: 1], AVNumberOfChannelsKey,
[NSNumber numberWithInt: AVAudioQualityMax],AVEncoderAudioQualityKey,
nil];
...
NSError *error;
recorder = [[AVAudioRecorder alloc] initWithURL: soundFileURL
settings: recordSettings
error: &error];