There are a number of libraries out there that deal with sound. FMOD, Ogg Vorbis, etc. are all viable options for an engine and most of them already have decent .Net wrappers. In fact I was thinking about FMOD, but I'm just not interested in paying the $100 fee if I decide to sell a product using it when there is a free option out there: DirectAudio. There are a couple of issues though with using DirectSound/DirectMusic in a product though:
-
DirectMusic isn't in the current version of the DirectX SDK (The
August SDK has it though)
-
Writing your own loaders for various sound files is a pain (although wav files aren't that bad actually)
-
SlimDX doesn't seem to support it yet
-
I'm not even going to talk about Managed DirectX, but suffice to say that writing your own wrapper might be the best choice
In fact I did that exact thing. I wrote my own wrapper for it:
Sound.zip (4.64 kb)
It allows for 3D sound, wav files, midi, etc. And I'm currently writing code to record sound from a mic to send over a network. However that isn't in the current version yet. One thing you might want to keep in mind about this update is it was written in C++ unlike the rest of the engine. Other than that though, it's pretty straight forward.
Anyway, It has been a while since I've posted an update about the Lunar Engine. You can blame a couple of large projects at work for the delay. Also, sadly this update is rather boring but I should be getting into more interesting portions of the engine in the next installment. Also expect some more web development posts in the next couple of days. i have some interesting code with regard to Exchange servers to share. Anyway, download the code, review, comment, etc. I always appreciate feedback.