On Linux, only ALSA headers and libraries are necessary:
Sources for the latest stable release (August 1, 2024): sndio-1.10.0.tar.gz
From the git repository:
git clone https://sndio.org/git/sndio
For instance, run:
./configure make
Run "./configure --help" to see all available options.
This step requires root privileges:
mkdir /var/run/sndiod useradd -r -g audio -s /sbin/nologin -d /var/run/sndiod sndiod make install ldconfig
If sndio is installed in a non-standard location, don't forget to update /etc/ld.so.conf accordingly before running ldconfig.
First, ensure the audio device is not used by other programs. Then, in one window start the sndio server as root (-dd options are to force the server to stay in foreground):
sndiod -ddIn another window, try to play a .wav file:
aucat -i /path/foo.wav
Remember that the server doesn't keep the device open while it's not used; this allows non-sndio programs to "steal" the device.
The corresponding /etc/init.d bits are in the contrib/ directory:
cp contrib/init.d.sndiod /etc/init.d/sndiod cp contrib/default.sndiod /etc/default/sndiod chmod 755 /etc/init.d/sndiod update-rc.d sndiod defaults
Start the daemon:
service sndiod start
To make the daemon start automatically at system boot, do:
update-rc.d sndiod enable
The corresponding /etc/systemd/system bits are in the contrib/ directory:
cp contrib/sndiod.service /etc/systemd/system cp contrib/default.sndiod /etc/default/sndiod systemctl daemon-reload
Start the daemon:
systemctl start sndiod
To make the daemon start automatically at system boot, do:
systemctl enable sndiod
Last updated August 1, 2024