If your computer uses PulseAudio (Ubuntu does), run the program via padsp
:
padsp yourprogram
It will intercept attempts to open /dev/audio
, /dev/dsp
, and other related devices (using a LD_PRELOAD shared library) and send the sound directly to PulseAudio.
For systems that use plain ALSA, the equivalent is aoss
from the "alsa-oss" package.
aoss yourprogram
aoss
should work on Ubuntu too, since by default ALSA itself is rerouted through PulseAudio, but better use padsp
in that case.
Most kernels also have the snd-pcm-oss
module, which provides real /dev/dsp
and /dev/audio
devices using ALSA:
sudo modprobe snd-pcm-oss
yourprogram
I've heard it doesn't work as good as aoss
, though, and I'm not sure whether it works at all when PulseAudio is running.
Doesn't oss-compat solve this?
– page4096 – 2012-10-29T20:56:09.413Hmm, it looks like it's supposed to, but it didn't work for me. – Matt Patenaude – 2012-10-29T23:25:15.277