Playing an ogg stream in iOS

淺唱寂寞╮ 提交于 2019-11-27 22:50:44
idz

There is no built-in support for playing ogg files in iOS, however, the source code for ogg compression/decompression is readily available (from xiph.com). It is fairly straightforward to compile this code for iOS and use it in an app.

I had a chance to compile the libraries and have made them available: "Precompiled Ogg Vorbis Libraries for iOS".

I have also made some sample source code available on GitHub that shows how to play decoded Ogg Vorbis audio on iOS: IDZAQAudioPlayer

.ogg file may also be encoded in Opus or FLAC, refer to Ogg wiki. IDZAQAudioPlayer may not cover all cases.

For Opus codec, you may refer Telegram for iPhone source code: https://telegram.org/apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!