Is DirectSound the best audio abstraction layer for Windows?

寵の児 提交于 2019-12-03 20:25:28

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.

See if SDL looks better.

Mecki

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.

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

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.

SharpDX looks interesting. I'm planning on trying it as a replacement for Managed DirectX because of the x86 limitations of the latter.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!