OSStatus error 1718449215

前端 未结 8 1226
陌清茗
陌清茗 2020-12-08 19:25

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


recorder = [[ AVAudioReco         


        
相关标签:
8条回答
  • 2020-12-08 19:29

    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

    0 讨论(0)
  • 2020-12-08 19:30

    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.

    0 讨论(0)
  • 2020-12-08 19:30

    My favourite tool for deciphering OSStatus codes is https://osstatus.com

    OSStatus error 1718449215 is kAudioConverterErr_FormatNotSupported, which may mean:

    • The format you're trying to export to is not supported (double check the file extension of your output file URL).

    • There's an issue with the recordSettings. One thing to look out for is that the value of the AVFormatIDKey matches the file extension of the output file URL.

    0 讨论(0)
  • 2020-12-08 19:30
    UInt32 code = CFSwapInt32HostToBig(error);
    NSLog(@"%4.4s"(char *)&code);
    
    0 讨论(0)
  • 2020-12-08 19:34

    "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);
    
    0 讨论(0)
  • 2020-12-08 19:48

    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.

    0 讨论(0)
提交回复
热议问题