mardi 24 mars 2015

Is there any way to play .amr files in IOS swift?

I have some audio files which are in amr format, which I cant convert to any other format, Is there any way to play this files in 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 the "amr" in ofType:, getting an error which file not exist.




Aucun commentaire:

Enregistrer un commentaire