How to play AMR audio file on iPhone

12,601

Even it is an old question, I still do not have an answer.

Instead, my way is converting to wave in advance, with the use of the following library from Github

https://github.com/justinjing/RecordWAVToAMRDemo/blob/master/AmrConvertAndRecord/VoiceConvert/VoiceConverter.mm

Share:
12,601
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I have tried using AVAudioPlayer , MPMoviePlayer to play AMR files but unable to play them. AVAudioPlayer play method always returns NO for AMR files and MPMoveiPlayer post MPMoviePlayerPlaybackDidFinishNotification as soon as it is played. Even tried to play play AMR with webview but without success.

    Is there any other way to play AMR files. According to this post About AMR audio file playing issue on different devices iOS4.3 above does not support AMR ,but how can mail app can play AMR files?

    I tried converting AMR to caf file using ExtAudioFile ,but I am getting an error code 1718449215 which I found out that it means kAudioFormatUnsupportedDataFormatError.