This project is read-only.
Project Description
Native C# wavpack decoder, intended for use with the dynamic sound API in XNA4.

WavPack is a high-quality compressed audio format, with a lossless mode (similar to FLAC files) or a smaller lossy mode (similar to mp3 files.) WavPack is an open format, not encumbered by any patents, with several open source encoders and decoders available.

Starting from the C# WavPack decoder written by Peter McQuillan (available from the WavPack downloads page) this decoder is suitable for use with XNA 4 on the Xbox 360. The original code works beautifully on Windows, but on the Xbox 360 (which doesn't have a generational garbage collector) the regular dynamic allocations would cause problems. I modified the code to allocate and reuse internal buffers instead.

Why would you need this instead of streaming your music with the existing XACT or Song systems built into XNA?
1) Dynamic effects
Since you have access to the individual samples, you can do any sort of realtime processing on them that you like.
2) Skip the content pipeline
If you need your content to exist outside the content pipeline, there's no good way to load music or sound effects built into XNA. (For example, if you have a music game you could copy your songs to the hard drive, and they would persist there even if they were replaced with new songs when you update the game. This would let you regularly add new content to the game without breaking the 150 MB file size limit.)
1) The decoder does not support WavPack correction files, only processes the first two audio channels in the file, and doesn't work with WavPack files before version 4.
2) The original WavPack decoder was written in C by Conifer Software, and the port to C# was written by Peter McQuillan.

Last edited Jan 21, 2011 at 6:03 PM by jessechounard, version 2