1

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 supports mp3, but can only play one file at a time.
  • SoundEffect can play multiple files, but only supports wav.

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

Ideas?

Community
  • 1
  • 1
l33t
  • 18,692
  • 16
  • 103
  • 180
  • did you manage to find any answers on this? Is it possible to play multiple instances of the MediaElement class? – James Mundy Dec 19 '12 at 23:49

1 Answers1

0

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

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).

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.

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150
  • I'm sure it is equally CPU heavy on Android. A native library is the way to go! You don't happen to know about such libraries? – l33t Nov 04 '12 at 20:02
  • I'm not familiar with any audio libraries at all. And mind you, it needs to work on ARM as well, plus pass the certification requirements. You might be out of luck for this. Remember that Windows Phone isn't a OS for a "handheld Linux PC", it's a mobile OS, designed for mobile applications. – Claus Jørgensen Nov 04 '12 at 20:09
  • I see that FMOD is working on a WP8 library. Perhaps that could work once it is ready? – l33t Nov 04 '12 at 20:12