如何检测如果另一个音频播放的背景是什么? (Windows Phone 7的) [英] How to detect if another audio is playing in background? (Windows Phone 7)

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

问题描述

我的一个应用程序最近失败的认证,因为:我的应用程序停止的背景音乐,而不要求用户当它要播放一些音乐

现在的问题是:我们如何可以检测是否有音乐播放的背景

问候

解决方案

 使用Microsoft.Xna.Framework.Media;
 

...

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

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?

Regards

解决方案

  using Microsoft.Xna.Framework.Media;

...

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

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

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