Loading sound in XNA without the Content Pipeline
- by David Gouveia
I'm working on a "Game Maker"-type of application for Windows where the user imports his own assets to be used in the game. I need to be able to load this content at runtime on the engine side.
However I don't want the user to have to install anything more than the XNA runtime, so calling the content pipeline at runtime is out.
For images I'm doing fine using Texture2D.FromStream.
I've also noticed that XNA 4.0 added a FromStream method to the SoundEffect class but it only accepts PCM wave files.
I'd like to support more than wave files though, at least MP3.
Any recommendations? Perhaps some C# library that would do the decoding to PCM wave format.