Synchronous multiroom audio player
Find a file
2015-01-02 09:08:47 +01:00
client stopping 2015-01-01 21:26:04 +00:00
common logging 2014-12-29 17:33:54 +00:00
init.d xxx 2014-12-29 11:49:00 +00:00
message enum 2015-01-01 20:16:24 +00:00
server v0.1 2015-01-01 18:19:30 +00:00
.gitignore added gitignore file 2015-01-02 08:50:26 +01:00
Makefile code cleanup 2015-01-01 18:15:20 +00:00
README.md Update README.md 2015-01-02 09:08:47 +01:00

SnapCast

Synchronous audio player

Installation

These installation instructions are valid for Debian derivates (e.g. Raspbian). First install all packages needed to compile snapcast:

$ sudo apt-get install libboost-dev libboost-system-dev libboost-program-options-dev libasound2-dev libvorbis-dev alsamixer

Build snapcast by cd'ing into the snapcast src-root directory

$ cd <MY_SNAPCAST_ROOT>
$ make all

Install snapclient and/or snapserver. The client installation will ask you for the server's hostname or ip address

$ make installserver
$ make installclient

Test

You can test your installation by copying random data into the server's fifo file

$ cat /dev/urandom > /tmp/snapfifo

All connected clients should play random noise now

WiFi setup: http://www.maketecheasier.com/setup-wifi-on-raspberry-pi/

MPD setup

Edit /etc/mpd.conf, so that mpd will feed the audio into the snap-server's named pipe

Disable alsa audio output by commenting the section:

#audio_output {
#       type            "alsa"
#       name            "My ALSA Device"
#       device          "hw:0,0"        # optional
#       format          "44100:16:2"    # optional
#       mixer_device    "default"       # optional
#       mixer_control   "PCM"           # optional
#       mixer_index     "0"             # optional
#}

Add a new audio output of the type "fifo", which will let mpd play audio into the named pipe "/tmp/snapfifo"

audio_output {
    type            "fifo"
    name            "my pipe"
    path            "/tmp/snapfifo" 
    format          "48000:16:2"
    mixer_type      "software"
}