According to the iOS Technology Overview the DVI/Intel IMA ADPCM format is supposedly supported. Specifically, there is a section that indicates:
iOS supports many industry-standard and Apple-specific audio formats, including the following:
AAC
Apple Lossless (ALAC)
A-law
IMA/ADPCM (IMA4)
Linear PCM
µ-law
DVI/Intel IMA ADPCM
Microsoft GSM 6.10
AES3-2003
However, in attempting to use the kAudioFormatDVIIntelIMA format key:
[[AVAudioSession sharedInstance]
setCategory: AVAudioSessionCategoryRecord
error: &error];
NSDictionary *recordSettings = @{
AVFormatIDKey : [NSNumber numberWithInt: kAudioFormatDVIIntelIMA],
AVSampleRateKey : [NSNumber numberWithFloat: 8000.0],
AVEncoderBitRateKey : [NSNumber numberWithInt:16],
AVNumberOfChannelsKey : [NSNumber numberWithInt:1]
};
NSError *error;
AVAudioRecorder *newRecorder =
[[AVAudioRecorder alloc] initWithURL: soundFileURL
settings: recordSettings
error: &error];
NSLog(@"Recorder Errors: %@", [error description]);
I am getting the error:
Error Domain=NSOSStatusErrorDomain Code=1718449215 "The operation couldn’t be completed. (OSStatus error 1718449215.)
with kAudioFormatUnsupportedDataFormatError being 1718449215. So what gives?
(Note that if I change this to kAudioFormatAppleIMA4, the code above works fine. So it seems that only IMA4 ADPCM is supported, not the DVI/Intel IMA ADPCM).