Installation

Requirements

On Linux only ALSA headers and libraries are necessary:

Download sources

Sources of the latest stable release (nov 6, 2016): sndio-1.2.0.tar.gz

From the git repository:

git clone http://caoua.org/git/sndio

Compilation

For instance, run:

./configure
make

Run "./configure --help" to see all available options.

Installation

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.

Testing

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 -dd
In 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.

Configuration as a system service

Systems using System-V init scripts

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

Make the daemon start automatically at system boot, do:

update-rc.d sndiod enable

Systems using systemd

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

Make the daemon start automatically at system boot, do:

systemctl enable sndiod

Last updated sep 19, 2017