Iphone - AVAudioRecorder provides monaural playback (audio playback in just one channel)

I use AVAudioRecorder to record sound and save to a wav file (using SDK 3.0). The settings dictionary contains the following values

    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];

    [recordSetting setValue :[NSNumber numberWithInt:16] forKey:AVLinearPCMBitDepthKey];
    [recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
    [recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];

Even after specifying the number of channels as 2, the playback is mono (i.e., playback in only 1 ear jack instead of both channels).

Has anyone else encountered this problem? Is there something wrong with the recordSetting dictionary values?

thank

Can someone help me with this ... If I specify the number of channels as 2, why will the playback be in one slot? (I use headphones for testing - the ones that come with my iPhone)

+1
2

, . , . , iPhone 3G 3GS , . , 3GS.

, .

+1

[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];

.

, , , , . , , , , .

+9

All Articles