同时播放多个 mp3/aac 文件? [英] Play multiple mp3/aac files simultaneously?

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

问题描述

在 Windows Phone 8 中,似乎有四种不同的音频播放方式.我玩过这些课程,但似乎不可能同时播放两个 mp3 文件.

In Windows Phone 8 there seems to be four different ways to play audio. I've played a bit with these classes and it seems impossible to play two mp3 files at the same time.

  • MediaPlayer 支持 mp3,但一次只能播放一个文件.
  • SoundEffect 可以播放多个文件,但只支持 wav.
  • MediaPlayer supports mp3, but can only play one file at a time.
  • SoundEffect can play multiple files, but only supports wav.

必须有一种方法可以混合多个 mp3 文件.Android 完美地做到了这一点.

There has to be a way to mix multiple mp3 files. Android does this perfectly.

想法?

推荐答案

必须有一种方法可以混合多个 mp3 文件.

There has to be a way to mix multiple mp3 files.

您需要将 mp3 文件合并成一个单一的输出流,因为 Windows Phone 一次只允许 3rd 方应用程序访问一个声道(无并发访问).

You would need to combine the mp3 files into a single wave-out stream, since Windows Phone only allows 3rd party applications to access one sound channel at the time (no concurrent access).

这对各种本机库都是可行的(您现在主要可以在 WP8 上使用这些库),但它肯定会占用大量 CPU 资源并消耗大量电池.

This is doable with various native libraries (which you can now, mostly, use on WP8), but it's bound to be very CPU heavy and consume a lot of battery.

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

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