shairport-sync plays audio streamed from iTunes or from an AirPlay
- device to an audio device connected via an audio back end. At present,
- the only fully-implemented back end is for ALSA.
-
-
A feature of shairport-sync is that the audio is played synchronously.
- This means that if many devices are playing the same stream at the same
- time, all the outputs will stay in step with one another.
- This allows multiple devices play the same source without getting out of phase with one another,
- enabling, for example, simultaneous multi-room operation.
-
-
-
-
-
-
-
Many of the options take sensible default values, so you can normally
- ignore most of them. See the EXAMPLES section for typical usages.
-
-
The command line for shairport-sync can take two kinds of options:
- regular program options and audio backend options.
- Program options are
- always listed first, followed by any audio backend options, preceded by
- a -- symbol.
These options are passed to the chosen audio backend. (At present, the
- only backend implemented is for ALSA.) The audio backend options are
- preceded by a -- symbol to introduce them and to separate them from any
- program options. In this way, option letters can be used as program
- options and also as audio backend options without ambiguity.
-
In the ALSA backend, audio is sent to an output device
- which you can specify using the -d option.
- The output level (the "volume") is controlled using a level control associated with a mixer.
- By default, the mixer is implemented in shairport-sync itself, i.e. the type of
- the mixer is "software".
- To use a level control on a mixer on the sound card, you must (a)
- specify that the mixer's type is "hardware" with the -t option;
- (b) you must specify where the mixer is to be found using the -m option
- and finally (c) you must specify the name of the level control you are using
- with the -c option.
The program will run in daemon mode ( -d ), will be visible as
- "Joe's Stereo" ( -a "Joe's Stereo" ) and will use the SoX Resampler
- Library-based stuffing ( -S soxr ).
- The audio backend options following the -- separator specify
- that the audio will be output on output 0 of soundcard 1 (
- -d hw:1,0 ) and will take advantage of the same sound card's hardware
- (-t hardware) mixer ( -m hw:1 )
- using the level control named "PCM" ( -c "PCM" ).
-
-
The example above is slightly contrived in order to show the use of the -m option.
- Typically, output 0 is the default output of a card,
- so the output device could be written -d hw:1 and
- then the mixer option would be unnecessary, giving the following, simpler, command: