views:

52

answers:

1

Hello,

Which audio recording format shall i consider in iPhone audio recording, since next step is to convert the audio recording format to WAV . Hence please guide me for which audio recording format in iPhone has libraries to convert into WAV format?

Thank You.

+1  A: 

AVAudioRecorder makes audio recording much simpler than it used to be in earlier SDK versions. You can configure it before recording to suit your needs.

The following settings should configure it for WAV files:

NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];
    [recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
    [recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey]; 
    [recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];

and this is used be the recorder during initialisation:

recorder = [[ AVAudioRecorder alloc] initWithURL:fileURL settings:recordSetting error:&error];
davbryn