Are these AVAudioSettings right?

Posted by Dyldo42 on Stack Overflow See other posts from Stack Overflow or by Dyldo42
Published on 2010-04-21T08:01:28Z Indexed on 2010/04/21 8:03 UTC
Read the original article Hit count: 392

self.recordSettings = [NSMutableDictionary dictionary];
[recordSettings setValue:[NSNumber numberWithInt:kAudioFormatAppleIMA4] forKey:AVFormatIDKey];
[recordSettings setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey]; 
[recordSettings setValue:[NSNumber numberWithInt:1] forKey:AVNumberOfChannelsKey];

recordSettings is declared in my view's header file and initialised in its viewDidLoad method. For some reason, everything is working in the simulator, but on a device, the [recorder record] method is returning NO. The only theory I have is that something in the recordSettings isn't compatible with an actual device. Any ideas?

© Stack Overflow or respective owner

Related posts about avfoundation

Related posts about avaudiorecorder