Loading sound in XNA without the Content Pipeline

Posted by David Gouveia on Game Development See other posts from Game Development or by David Gouveia
Published on 2011-12-08T17:34:02Z Indexed on 2012/11/03 5:28 UTC
Read the original article Hit count: 422

Filed under:
|
|

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.

© Game Development or respective owner

Related posts about XNA

Related posts about c#