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.
source
share