多任务 iphone sdk-uibackgroundmodes 无法处理音频?
嘿, 我正在开发一个流式传输互联网 mp3 音频的应用程序。它是一个无线电应用程序,现在我想添加多任务功能,但不幸的是它不起作用。一旦应用程序进入后台,音频就会关闭。 mp3 流媒体正在使用 audiotoolbox。我怎样才能同时处理多项任务?我已经尝试了 uibackgroundmodes 通过将其添加到 plist 中(必须通过进入文本文件来手动添加它,因为它没有显示在下拉菜单中可能是这可能的原因,但我不知道如果出现这种情况该怎么办就是这个原因)。所以我的问题很明确,为了使我的应用程序实现多任务,我还需要做什么?我有什么遗漏的吗(我很确定,但不确定是什么)。任何代码将不胜感激 谢谢, TC
Hey,
I am working on an application that streams mp3 audio of the internet. it is a radio application and now I would like to add multitasking functionality but unfortunately it isn't working. the audio shuts off as soon as the application goes into background. the mp3 streamer is using audiotoolbox. How can I multitask? I have tried the uibackgroundmodes by adding it in plist (had to add it manually by going into text file because it wasn't showing up in the drop down menu may be this could the reason why but I am not sure what to do if this is the reason). So my question is clear is there anything else I have to do in order to make my application multitask? is there anything I am missin (well sure I am but not sure what). Any code would be appreciated
thanks,
TC
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您已正确编辑 Info.plist,以允许背景音频(请参阅 post),那么如果音频开始,它应该在应用程序进入后台时播放。引用自 Apple 文档:
If you've correctly edited the Info.plist, to allow background audio (see post), then if audio started it should play when app enters background. Quote from Apple documentation: