OSStatus error 1718449215

24,472

Solution 1

1718449215 is the decimal representation of the four character code for the kAudioFormatUnsupportedDataFormatError error.

In general you can use something like this to get more information from the errors you receive:

NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain
                          code:my_error_code
                          userInfo:nil];
NSLog(@"Error: %@", [error description]);

Solution 2

In case this helps others: I just had the same error, and it was caused by trying to create/use audio files in the wrong format. I had preset the recording to create a .caf file, but instead, called the file xxx.wav.

Solution 3

OSStatus error codes are pain, they are often too general to help. Did you try to decode the four-char error code? Sometimes that helps (other times you just get garbage). Create and show us a minimal code example that exhibits the problem. In this case I bet that the four-char code is fmt?. Google for the numeric code and you should be wiser.

Solution 4

I also faced this issue when I converted file type to .mp3 while previously I was using .caf format for recording sound with AVAudioRecorder. I again converted file type to.caf format & it works. You may use following formats

AAC, PCM, IMA4, ULAW, ILBC

Solution 5

"NSDictionary" if it is empty, the default is high quality, if you set, this value will be very low, you can try to cancel these parameters:

setting[AVFormatIDKey] = @(kAudioFormatAppleIMA4);
setting[AVSampleRateKey] = @(600.0);
setting[AVNumberOfChannelsKey] = @(1);
setting[AVLinearPCMBitDepthKey] = @(8);
Share:
24,472
jfalexvijay
Author by

jfalexvijay

Doing Research & Development... iOS/Android

Updated on August 20, 2020

Comments

  • jfalexvijay
    jfalexvijay over 3 years

    I have created an iPhone application to record our voice. When I try to record, I am getting error message in following statement.

    
    recorder = [[ AVAudioRecorder alloc] initWithURL:url settings:recordSetting error:&err];
    

    Error Domain=NSOSStatusErrorDomain Code=1718449215 "Operation could not be completed. (OSStatus error 1718449215.)"

    If I tried to record in .caf file, it is working fine. If I tried with .m4a, I am getting this error message.

    Please help me to resolve it.

    Thanks.

  • memmons
    memmons over 12 years
    .m4a is a file format, not a codec. The codec you are recording in is determined by AVFormatIDKey.
  • Matt
    Matt over 8 years
    Please consider editing your answer to include an explanation of how your code works.
  • Rob
    Rob about 8 years
    I've removed the comments in Chinese from your post. If they are crucial to your answer, please translate them into English and add them back. StackOverflow is for English only. Thanks!
  • peng
    peng about 8 years
    oh i see..thanks for your clarification. Dear, please forgive my English is not very good, but you can try this answer, I hope this answer will help to you
  • peng
    peng about 8 years
    Thank you for reminding me, forgive my carelessness, I will pay attention to it later,and I want to say you're right.Thanks!
  • Rob
    Rob about 8 years
    Not a problem at all :)
  • peng
    peng about 8 years
    A wonderful day,In China this time has been late at night,Have a good time. Bye. 😊
  • Josh
    Josh almost 8 years
    Thanks for the formats, which file extensions are allowed by iOS? for examploe, what is the file extension for an ULAW formatted file?
  • Stewart Macdonald
    Stewart Macdonald over 5 years
    I had this same error when I had AVFormatIDKey set to kAudioFormatLinearPCM (wav format) but had forgotten to change the file extension on the destination file from .m4a to .wav.
  • ch271828n
    ch271828n over 3 years
    Hi what extension should I have for kAudioFormatAMR? Thanks!