I'm in the process of trying to debug a program that uses the legacy OSS /dev/audio
interface to play sounds. However, Ubuntu and others no longer include a /dev/audio
interface. Are there any relatively-modern Linux distributions that I could download in a virtual machine to test with?
Linux – Are there any modern Linux distributions that still support /dev/audio
audiolinuxlinux-distributions
Best Answer
If your computer uses PulseAudio (Ubuntu does), run the program via
padsp
: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
should work on Ubuntu too, since by default ALSA itself is rerouted through PulseAudio, but better usepadsp
in that case.Most kernels also have the
snd-pcm-oss
module, which provides real/dev/dsp
and/dev/audio
devices using ALSA: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.