煌めくどんな星も、君を照らすから - Princever.GitHub.io

Princever's blog

HOME PAGE
  • Github
  • Downloads
  • About
  • Contact

Princever.github.io

Sharing and enjoying my life!


    AirPlay

    Here’s a blog about realizing the AirPlay Funtion on a Raspberry Pi.

    The equipments I used are:

    1
    2
    3
    4
    
    Raspberry * 1;
    Macbook Pro * 1;
    Ipad * 1;
    Earphone * 1;
    

    So, with above equipments got ready, Let’s update the software source first.

    1
    
    apt-get update
    

    The second step is to change the audio output settings. As AirPlay have default settings(HDMI), since the we don’t have a external display here, so change the settings to only output audio here.

    1
    
    amixer cset numid=3 1
    

    Now it’s the turn of dealing with software on Linux of my Raspberry Pi. Firstly install the shairport dependencies pack here.

    1
    
    apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl
    

    The next step is to install the Perl NET-SDP pack cause the iOS system requires this pack to support the airplay function. Using the following command line instruction:

    1
    
    git clone https://github.com/njh/perl-net-sdp.git perl-net-sdp
    

    Then

    1
    2
    3
    4
    5
    
    cd perl-net-sdp
    perl Build.PL
    ./Build
    ./Build test
    ./Build install
    

    OK, now we can install the shairport, which is an airplay emulator can help us finish the job. Using

    1
    
    cd ../
    

    to back to the upper directory,running following instructions in order:

    1
    
    git clone https://github.com/hendrikw82/shairport.git
    

    1
    2
    
    cd shairport
    make
    

    Well done! We can start the airplay service right now! Here AirPrince is the name of my AirPlay device(Raspberry in this situation).

    1
    
    ./shairport.pl -a AirPrince
    

    Turn on WIFI on iPad to search AirPlay devices for airplaying, and plug the earphone in the Raspberry Pi for enjoying the airplayed music now!

    Thanks for viewing! Don’t forget following me on GitHub!

    Written on April 17, 2015
  • Site
  • Archives
  • Tags
  • Categories
  • Operate System
  • Algorithm and Data Stucture
  • Database
  • Android
  • Embedded System
  • Linux
  • Life In ZJU
  • Learning Japanese
  • New Life
  • Unclassified
  • Social
  • GitHub
This page was designed by Prince. Welcome to my Github.