HOWTO: Linux - Darwinia - Choosing a sound device

Problems with the Linux version of Darwinia

Moderators: jelco, bert_the_turtle, Chris, andy, John

gravygoat
level0
Posts: 7
Joined: Sun Jan 28, 2007 9:34 pm
Location: Woodbine, GA

HOWTO: Linux - Darwinia - Choosing a sound device

Postby gravygoat » Sun Jan 28, 2007 11:17 pm

Darwinia uses the SDL sound libraries on Linux. SDL will use the default sound device in your system as defined by whichever hardware device links to /dev/dsp. If you have more than one sound device and want to use something other than the default (such as a using USB headset when your motherboard sound is the default) look in /dev and see how many dsp entries you have. My machine has 3 - /dev/dsp is my motherboard, /dev/dsp1 is my USB headset, and /dev/dsp2 is my USB webcam.

To make an SDL game use something other than the default you need to set an environment variable telling SDL which dsp device to use. The environment variable is SDL_PATH_DSP and it needs to be set either in your profile when you log in (if you want it to be the new default) or every time you run the game. You can run it from the command line like this:

export SDL_PATH_DSP=/dev/dsp1; darwinia

Note the semicolon between the variable export and the darwinia command. This allows you to run both on one line. Alternatively you can do the export on one line, hit enter, and then run darwinia.

I have set my command to start the game in my KDE menu entry to look like the one above so it sets the variable every time I start the game.

Happy gaming!
~{Gravygoat}~
roberts
level0
Posts: 1
Joined: Thu Jun 14, 2007 3:41 pm
Contact:

Postby roberts » Sat Jun 16, 2007 12:27 am

Thanks for post, it is useful to me, Thanks.

--------
software reviews
User avatar
ewanm
level3
level3
Posts: 349
Joined: Sat Jan 21, 2006 8:15 pm
Location: ::1
Contact:

Postby ewanm » Sat Feb 02, 2008 6:31 pm

Same for Uplink and Defcon, as a such I propose this be made sticky.

Return to “Linux Issues”

Who is online

Users browsing this forum: No registered users and 5 guests