问题描述
当我在我的Windows Phone 7应用程序中使用BackgroundAudioPlayer,需要花费大量的时间来加载我第一次想要播放一首歌曲。有没有打第一首曲目之前preinitializing的BackgroundAudioPlayer的任何方式,所以,当我开始播放,它的权利一起启动?我用Google搜索,但没有运气。我只是用BackgroundAudioPlayer.Instance当我如要播放,暂停,停止等的audiotrack。是否有其他的东西我可以做些什么来解决这个问题?
When I am using the BackgroundAudioPlayer in my Windows Phone 7 application, it takes a lot of time to load the first time I want to play a song. Is there any way of preinitializing the BackgroundAudioPlayer before playing the first track, so that when I start playing, it starts right along? I have googled it, but no luck. I am just using BackgroundAudioPlayer.Instance when I e.g. want to play, pause, stop etc an audiotrack. Is there something other i could do to fix this?
在此先感谢!
推荐答案
您可以只叫 BackgroundAudioPlayer.Instance.Stop();
在App构造函数,然后丢弃的第一次出现 UserAction.Stop
在 OnUserAction
方法在实施 AudioPlayerAgent
You could just call BackgroundAudioPlayer.Instance.Stop();
in your App constructor and then discard the first occurance of UserAction.Stop
in the OnUserAction
method in your implementation of AudioPlayerAgent
这篇关于预初始化BackgroundAudioPlayer在WP7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!