MagicPlay is an open cross-platform audio streaming standard (think “HTTP for music”) that supports synchronized streaming to multiple speakers (like Sonos). For more details, see this Verge story. In the near future you’ll be able to buy WiFi speakers, TVs and other products that come with MagicPlay support out of the box. If you want to try MagicPlay right now, you can turn an existing device such as the Raspberry Pi into a MagicPlay device and stream music to it using doubleTwist Player for Android.

Prerequisites:

If you would like to skip building the source code, you can download a binary package instead.

  1. Download the AllJoyn source code (AllJoyn is a P2P framework developed by Qualcomm to power the Internet of Things).
  2. Unzip the AllJoyn code: tar -zxvf alljoyn-3.3.0-src.tgz; cd alljoyn-3.3.0-src
  3. Clone the following two repositories:
  4. Apply this patch: zcat magicplayd.diff.gz | patch -p0
  5. Build AllJoyn library: make OS=linux CPU=armhf VARIANT=release
  6. Build and install audio service: cd services/audio; make CPU=armhf; sudo make CPU=armhf install

The MagicPlay service (/etc/init.d/magicplayd) has now been installed and will automatically start on boot.

Note that if you want to use a USB sound card with MagicPlay on the Raspberry Pi, you will need to modify services/audio/src/posix/ALSADevice.cc prior to step #7 and replace “plughw:0,0” with “plughw:1,0” and “hw:0” with “hw:1” (since the USB sound card would be sound card #2).

To get beta builds of doubleTwist Player for Android, make sure to join the doubleTwist Google Plus community.

The setup pictured below includes a LP-2020A+ Lepai amplifier ($20) and Micca MB42 speakers ($50).

RaspberryPi-MagicPlay

MagicPlay1

MagicPlay2