I want to play .opus file using AVAudioPlayer, since AVAudioPlayer doesn't support .opus file, I am trying to find a way to convert .opus to any other audio format so that I can play using AVAudioPlayer. Could anyone help me on this?
Thank you
I want to play .opus file using AVAudioPlayer, since AVAudioPlayer doesn't support .opus file, I am trying to find a way to convert .opus to any other audio format so that I can play using AVAudioPlayer. Could anyone help me on this?
Thank you
You could use libopus
or libopusfile
C libraries to dynamically decode Opus files to raw PCM audio and feed that to a memory buffer that AVAudioPlayer could decode. You would most likely need to prepend the memory buffer with AIFF/WAV/RIFF header bytes that describe the PCM data.
You could use the VLCKit library ;)
https://code.videolan.org/videolan/VLCKit/blob/master/README.md