views:

2102

answers:

5

Is DirectSound the best audio abstraction layer for Windows? Switching my app from a very bad sound implementation, built to a specific chipset, to an abstration layer.

App is native Winform, .net 3.5. DirectX/DirectSound is the likely choice, but a little concerned about the overhead. Any other options? Or is it silly to even THINK about anything else?

+2  A: 

See if SDL looks better.

Sijin
+5  A: 

DirectSound is not getting the same love from Microsoft today as it got in the past. As far as DirectX is concerned, you may try XAudio2 or XACT instead. Some people love those, others hate them. XAudio2 is more low-level, while XACT is rather high-level. Both are accessible from Microsoft XNA, which is like Managed DirectX, but is actively developed.

But you are not restricted to using what DirectX comes with. Try FMod if you want something great. They still have their Shareware/Hobbyist license model and a Freeware license model, in case you don't want to pay some big bucks.

Your choice depends on what exactly you want to do with sound.

OregonGhost
It is funny you mentioned that DirectSound isn't getting the love it used to. I used to be a DirectX/Direct3D/DirectPlay/DirectSound developer (years ago), and I myself noticed that it has stagnated, which led me to ask the question.
pearcewg
A: 

DirectSound is pretty good.

If you need low latency or good support for sound input and output via multiple soundcards at the same time you may also want to have a look at ASIO:

http://de.wikipedia.org/wiki/Audio_Stream_Input/Output

Nils Pipenbrinck
A: 

The waveOut... API is still an option. It's tricky to work with from managed code, but you can play multiple sounds at once this way (in XP and Vista, at least).

If you just need to play sounds occasionally, System.Media.SoundPlayer is very easy to use. However, you can't play more than one sound at a time with this component.

DirectSound is your only other major alternative. It has a built-in software synthesizer, if that's something you need.

EDIT: SDL looks interesting. Thanks, Sijin.

MusiGenesis
+2  A: 

Well, you can try OpenAL instead. What OpenGL is to Direct3D is OpenAL to DirectSound(3D). The interface is pretty similar to OpenGL, if you don't like that, you'll probably dislike OpenAL, too. Also I'm not sure if the Windows version of this lib is an own, native implementation or just calls DirectSound and thus might just be a (thin?) wrapper on top of it.

Mecki
Are there native .NET libraries for OpenAL? I really enjoyed coding in OpenGL, back in da day.
pearcewg