Hi everybody,
I want to initialize a AVAudioRecorder with a aac file format, but it doesnt work...
Whats wrong with the following code?
soundFilePath = [soundFilePath stringByAppendingPathExtension:@"aac"];
NSURL *url = [NSURL fileURLWithPath:soundFilePath isDirectory:FALSE];
NSMutableDictionary *recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue:[NSNumber numberWithInt: 'aac '] forKey:AVFormatIDKey]; //General Audio Format Settings
[recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey]; // "
[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey]; // "
[recordSetting setValue:[NSNumber numberWithInt: 32] forKey:AVLinearPCMBitDepthKey]; //Linear PCM Format Settings
[recordSetting setValue:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey]; // "
[recordSetting setValue:[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey]; // "
[recordSetting setValue:[NSNumber numberWithInt:AVAudioQualityLow] forKey:AVEncoderAudioQualityKey]; //Encoder Settings
[recordSetting setValue:[NSNumber numberWithInt:96] forKey:AVEncoderBitRateKey]; // "
[recordSetting setValue:[NSNumber numberWithInt:16] forKey:AVEncoderBitDepthHintKey]; // "
[recordSetting setValue:[NSNumber numberWithInt:AVAudioQualityLow] forKey:AVSampleRateConverterAudioQualityKey]; //Sample Rate Conversion Settings
_recorder = [[AVAudioRecorder alloc] initWithURL:url settings:recordSetting error:nil];
this allocation just returns nil...
Any help will be appreciated...!