marclundgren
11/25/2013 - 2:47 AM

raspberry-pi--airplay.sh

# Set Up Your Sound Card
aplay -l &&
alsamixer

speaker-test &&

cd /etc/modprobe.d &&

echo "Look for this line && comment out: options snd-usb-audio index=-2"
sudo nano alsa-base.conf

# Install the Shairport AirPlay Emulator
sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl &&

git clone https://github.com/njh/perl-net-sdp.git perl-net-sdp &&
cd perl-net-sdp &&
perl Build.PL &&
sudo ./Build &&
sudo ./Build test &&
sudo ./Build install &&
cd .. &&
git clone https://github.com/hendrikw82/shairport.git &&
cd shairport &&
make &&
./shairport.pl -a AirPi &&

cd shairport &&
make install &&
cp shairport.init.sample /etc/init.d/shairport &&
cd /etc/init.d &&
sudo chmod a+x shairport &&
update-rc.d shairport defaults &&

sudo nano shairport &&
echo "This loads up Shairport file we need to edit. Look through the file for the DAEMON_ARGS line, and change it so it looks like this DAEMON_ARGS=-w $PIDFILE -a AirPi"