在WP8同时播放多个音频文件 [英] Playing multiple audio files simultaneously in WP8

查看:161
本文介绍了在WP8同时播放多个音频文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在WP8从同一个应用程序内同时播放两个音频文件:

I want to play two audio files simultaneously in WP8 from within the same app:


  1. 第一个将被推出的BackgroundAudioPlayer.Instance.Play();

  2. 第二个将通过HTML5的声音元素的应用程序的HTML文件中启动。

的情况是这样的:


  • 当用户启动应用程序,背景音乐开始播放。

  • 当用户进入应用程序的特定HTML页面时,其相关的音乐开始播放。

  • 当用户切换应用程序或锁定屏幕,即HTML页面的音乐停止,不过,背景音乐不断播放直到应用程序被关闭。

  • 当用户回来了Html页面再次,与其相关的音乐开始与背景音乐播放沿。

鸭preciate你对这个建议。

Appreciate your suggestions on this.

感谢。

推荐答案

总之,我们已经测试了一个非常简单的应用程序试图播放simultanously两个音频文件。该应用程序的工作是这样的:

Together, we have tested a very simple App trying to play simultanously two audio files. The App worked like this:


  • 播放按钮已通过BAP开始的音频文件

  • 那么我们在 web浏览器导航到一个页面(位于IsolatedStorage),那里有一个音频元素

  • 和我们在 web浏览器(背景仍然BAP播放)
  • 按下播放键
  • Play button has started audio file via BAP
  • then we have navigated in WebBrowser to a page (located in IsolatedStorage) where there was an audio element
  • and we have pushed play button in WebBrowser (still BAP playing in the background)

原来 web浏览器使用BAP作为一名球员,所以我们经过pressed按钮,我们可怜的BAP在后台播放被终止,取而代之从 web浏览器新新鲜的

It turned out that WebBrowser uses BAP as a player, so after we have pressed the button, our poor BAP playing in the background was terminated and replaced with new fresh one from WebBrowser.

这意味着,我们的宏伟理念和精湛的计划已在藤上枯萎​​了。

It means that our magnificent idea and superb plan had withered on the vine.

这篇关于在WP8同时播放多个音频文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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