Preinitialize BackgroundAudioPlayer in WP7?

自闭症网瘾萝莉.ら 提交于 2019-12-04 10:57:59

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

This might be looking at this from a simple angle, but could you not call play and then instantly pause it until you are ready to play?? I'm not hugely familiar with the control but looking here:

http://msdn.microsoft.com/en-us/library/microsoft.phone.backgroundaudio.backgroundaudioplayer_members(v=vs.92).aspx

Upfront you could possibly check BufferingProgress and PlayerState to check when the track is ready to play, and then pause until you're ready to continue.

It's a bit brute force but may work. Worth a try?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!