Sunday, March 26, 2006

No Sound in Games

Well after getting my new machine up and running I was having a problem getting my sound to work in games. It worked perfect in audio playing programs. I was just unable to get it to work in Enemy Territory or Americas Army. I had not clue why, but I ran it from a terminal and read the output after I quit it. The errors I was getting were:


/dev/dsp: Input/output error
Could not mmap /dev/dsp

No idea why. I did find some things to try in this article though:
quake 3 no sound in breezy [Archive] - Ubuntu Forums

The first thing I tried was emerging alsa-oss. No luck. Then I tried adding the following to /etc/init.d/bootmisc

#-----------------------
# fix sound for Quake 3 and Enemy Territory
echo "et.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
echo "quake3.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
echo "quake3.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss
#------------------------

I then restarted bootmisc (you can also reboot) and sound worked in both games.