如何检测另一个音频是否在后台播放?(Windows 电话 7) [英] How to detect if another audio is playing in background? (Windows Phone 7)

查看:28
本文介绍了如何检测另一个音频是否在后台播放?(Windows 电话 7)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一个应用最近未通过认证,原因是:我的应用停止了背景音乐,而没有询问用户何时想要播放某些音乐".

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?

问候

推荐答案

  using Microsoft.Xna.Framework.Media;

...

    if (Microsoft.Xna.Framework.Media.MediaPlayer.State == MediaState.Playing)
    {
          ....
    }

这篇关于如何检测另一个音频是否在后台播放?(Windows 电话 7)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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