Recording to wave file results in invalid file

I'm trying to record to kAudioFileWAVEType. The recording seems to be successful but when I check

lastRecording = [NSData dataWithContentsofURL:fileURL];

The bytes seem to be wrong and the length of the NSData always 4096, no matter of the duration of the recording. I tried the same with kAudioFileM4AType and everything looks good. Could it be that the audio file does not close properly when kAudioFileWAVEType?

Thanks for your time in advance.

PS: It's a typical recording setup, using beginRecordingToFileAtPath: fileType: bitDepth: channels: error and [recorder finishRecording]

Comments

  • Can you reproduce this with the recorder in the sample app @mike56?

  • Just today I was struggling with this very thing, and I realized I forgot to add a call to [audioController start:&error] Doh!

Sign In or Register to comment.