Previous Next

Programming /dev/audio

The /dev/audio device is similar to /dev/dsp, but is intended for compatibility with the audio device on workstations made by Sun Microsystems, where it has the same name. The device uses mu-law encoding. It does not support the SunOS ioctl functions (in principle it could, though). The main purpose is to support user commands such as cat file.au >/dev/audio to play Sun mu-law encoded files.

It is not recommended that you use /dev/audio for new application programs. The mu-law encoding adds software overhead and some distortion. It is better to use the /dev/dsp interface instead. Only one of /dev/audio and /dev/dsp is available at any one time, as they are just different software interfaces to the same hardware device. There is also a /dev/audio1 device available for those cards that have a second sampling device.


Next  Programming /dev/mixer
Previous  Sample Program


O'Reilly Home