Is there a way to play .amr files in iOS swift?

I have several audio files that are in a format amrthat I cannot convert to any other format. Is there a way to play these files on iOS using swift (AVFoundation)?

I tried this code

var audioPlaying = AVAudioPlayer()
audioPlaying = AVAudioPlayer(contentsOfURL: NSURL(fileURLWithPath:
       NSBundle.mainBundle().pathForResource("music", ofType: "mp3")!), error: nil)
audioPlaying.play()

but when I use "amr"in ofType:, you get an error whose file does not exist.

+4
source share
2 answers

The Opensore-AMR iOS perspective is probably your best starting point.

github.com/feuvan/opencore-amr-iOS

It also provides guidance on compiling it for iOS, as this is not an easy task:

http://swati-ios.blogspot.co.uk/2013/01/compile-opencore-amr-for-ios-projects.html

+4

AMR Apple ( iOS 4.3).

, (, opencore-amr library) .

+3

All Articles