如何播放下载的mp3文件?
我已经成功从服务器下载了一个 mp3 文件,但我遇到的问题是,我不知道如何播放该文件。我应该使用 AVAudioPlayer 还是 AudioQueue 来播放该文件?如果您能在这里发布一些示例代码,我将不胜感激。
I have downloaded a mp3 file from a server successfully, but the problem I encountered is, I don't know how to play that file.. Should I use AVAudioPlayer or AudioQueue to play the file?? I will be appreciate if you could post some sample code here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AVAudioPlayer
和音频队列 API 都可以用来播放 MP3 文件。AVAudioPlayer
文档齐全,并且有大量可用的示例代码。那么为什么不先尝试一下,如果不起作用,请在此处发布更具体的问题。Both
AVAudioPlayer
and the Audio Queue API can be used to play MP3 files. TheAVAudioPlayer
is well documented and has a lot of sample code available. So why not give it try first and if that does not work, post a more specific question here.