Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » DirectSound on Linux

This thread is locked; no one can reply to it. rss feed Print
DirectSound on Linux
Kitty Cat
Member #2,815
October 2002
avatar

Here's another side project I had going on for a while. This was created initially to help get DSound3D games working in Wine with full surround sound, by wrapping DirectSound around OpenAL. With my work on getting Direct3D natively in Linux, I decided to revisit this and see if I could get it natively working as well.

http://kcat.strangesoft.net/dsoal-20081111.tar.bz2 (~47KB)

It requires the latest GIT version of OpanAL-Soft, here.

Currently, it supports playback in DSound8 and non-DSound8 modes, with the 3D interfaces. Capture is not fully supported (you can create a capture object/buffer, but it'll fail to play and lock). Full-duplex doesn't work yet (creating a full-duplex object will fail, though you can create playback and capture objects seperately).

As with the Linux Direct3D lib, this is mainly to help in porting existing apps and stuff. Of course it's less useful since accelerated DirectSound is dead with Vista, so new games won't be using it, but there are existing apps that could still benefit. Plus I'm kinda interested in seeing all the DirectX libs/APIs running natively, using open source code and wrapping around other APIs as appropriate. :)

The wrapper can also be used on Windows, though you will need a hardware OpenAL driver and you'd need to remove/rename wrap_oal.dll (since wrap_oal.dll loads dsound.dll, which would load openal32.dll, which loads wrap_oal.dll..).

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Don Freeman
Member #5,110
October 2004
avatar

I am interested in your work on getting Direct3D working on Linux...sounds cool. Are you just making wrappers to call openGL functions or what?

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

I am interested in your work on getting Direct3D working on Linux...sounds cool. Are you just making wrappers to call openGL functions or what?

Pretty much. Right now I'm waiting for GL_ARB_framebuffer_object and GL_EXT_vertex_array_bgra. The latter so I don't have to worry about swizzling color components (not critical, but you can get some r/b or x/z swaps without it).

GL_ARB_framebuffer_object is pretty important though, as it allows different-sized surfaces between the color buffer and depth buffer. D3D allowed this somewhat, but the original GL_EXT_framebuffer_object extension didn't.. and some games like to use a bigger depth buffer than color buffer. I could try to do work arounds, but it wouldn't be that efficient, and it'd be somewhat limitting and error-prone.

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Don Freeman
Member #5,110
October 2004
avatar

Do you have any links to download, or is it all in the one above? I would like to see if I could help maybe. I'm no wizard, but I would like to take a look at least...::)

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

Kitty Cat
Member #2,815
October 2002
avatar

I posted about it before: http://www.allegro.cc/forums/thread/597522
Though here's a more up-to-date version (has multisampling and some other stuff working).. http://kcat.strangesoft.net/d3dgl-20081112.tar.bz2

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

Don Freeman
Member #5,110
October 2004
avatar

I'll check it out. Thanks! It would be great to be able to play more games in Linux.:D

--
"Everyone tells me I should forget about you, you don’t deserve me. They’re right, you don’t deserve me, but I deserve you."
"It’s so simple to be wise. Just think of something stupid to say and then don’t say it."

MiquelFire
Member #3,110
January 2003
avatar

Kitty Cat, bringing DirectX games to Linux, one piece at a time.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Go to: