在音频队列中播放ipod库歌曲,而不是使用mpmusicplayer控制器播放 [英] playing ipod library songs in audio queues , not with mpmusicplayer controller

查看:67
本文介绍了在音频队列中播放ipod库歌曲,而不是使用mpmusicplayer控制器播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在播放视频的同时在后台播放音乐库中的歌曲. 音频和视频都将同时播放...首先,我尝试使用mpmusicplayercontroller播放音乐,但是当我播放视频时,它会停止在后台播放歌曲.之后,我尝试使用audiotoolbox播放音乐.音频队列".现在我可以同时播放音频和视频,但是我正在播放的歌曲是静态的.我想播放ipod库中的歌曲,我需要在那儿提供文件路径,所以有什么方法可以获取库中的歌曲路径吗?或其他任何想法?请建议..!

i need to play songs from my music library in the background , while playing video.. Both audio and video will play at the same time... first i tried using mpmusicplayercontroller to play music , but when i play video , its stops playing song in background. after that i tried to play music using audiotoolbox."Audio Queues". now i can play audio and video at the same time ,but the song i am playing is static. i want to play song from ipod library and i need to provide the file path there, so is there any way to get the library song path? or any other idea? please suggest..!

推荐答案

尽管有可能,但苹果公司不希望您知道如何操作.他们不希望人们能够以编程方式访问歌曲数据.这可能会导致音乐共享,而Apple试图使音乐共享变得不那么容易.

While it may be possible, Apple doesn't want you to know how. They don't want people to be able to programmatically access the song data. It can lead to music sharing, which Apple tries not to make easy.

也许做到这一点的方法是使视频成为静态,并通过MPMusicPlayer获得歌曲.当然,您必须使用不同于MPMediaPlayer的机制来播放它们.

Maybe the way to do this is to have your videos be the thing that is static and get your songs through MPMusicPlayer. Of course, you'll have to play them with a different mechanism than MPMediaPlayer.

这篇关于在音频队列中播放ipod库歌曲,而不是使用mpmusicplayer控制器播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆