2
votes

One of my apps have recently failed certification because: "my app stops background music without asking user when it wants to play some music".

Now the question is: how can we detect if there is any music playing in the background?

PS: No XNA, or XAML answers please, it's a game targeting Windows Phone Direct 3D App (Native Only), using Xaudio 2

1

1 Answers

0
votes

You say you don't want an XNA or XAML answer but I think to accomplish this, you would have needed to start with the Direct3D with XAML project template. This would have given you the ability to call into MediaPlayer.GameHasControl

For Direct3D itself, you use Media Foundation But I don't think you can do it through there.