在 iPhone 上播放 MP3 音频数据
我需要在iPhone中连续播放mp3音频数据。我通过 iPhone 中的服务器获取连续的 mp3 数据。现在我需要在iPhone中播放这些数据。我无法访问要播放的网址,因为它是彩信协议。所以,对于播放这种类型的数据来说这是最好的方法。谁能帮我解决这件事。
提前致谢。
I need to play mp3 audio data in iPhone continuously. I am getting continuous mp3 data via server in iPhone. Now I need to play this data in iPhone. I cannot access url to play as it is of mms protocol. So, for playing this type of data which is the best method to use. Can anyone help me out with this thing.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您有几种由 Apple 批准或直接来自 Apple 的选项。您应该查看:
此外,您还可以尝试 Matt Gallagher 的 AudioStreamer 类。如果您查看代码,它应该能够完成这项工作,或者至少可以帮助您弄清楚如何做到这一点。
在这四个选项之间,应该有一些可以提供帮助的东西。
注意:
写完这篇文章后,我做了一些谷歌搜索,发现 此主题讨论将 MMS 媒体流式传输到 iPhone 的可能性。由于 Microsoft 许可的费用,这似乎不可能。理论上,上述框架应该可以满足您所需的一切,但由于许可问题,您似乎无法做到这一点。
祝你好运!
You have a few options sanctioned by or directly from Apple. You should look into:
Also, you can try Matt Gallagher's AudioStreamer class. It should be able to do the job, or at least help you figure out how to do so, if you look at the code.
Between those four options, there should be something to help.
NOTE:
After writing this, I did a bit of Googling and I found this thread that discusses the possibility of streaming MMS media to iPhone. It appears that it is not possible, due to the cost of a license from Microsoft. In theory, the above-mentioned frameworks should do everything you need, but it seems that you cannot because of the licensing issue.
Good luck!
audioPlayer = [[AVAudioPlayer alloc]initWithData:<#(NSData )data#>;错误:<#(NSError *)outError#>];
试试这个,不然更清楚地告诉我你想做什么
audioPlayer = [[AVAudioPlayer alloc]initWithData:<#(NSData )data#> error:<#(NSError *)outError#>];
try this else tell me more clear what you want to do