AirPlay Audio Escapades

A few years ago, I recieved an IKEA SYMFONISK Bookshelf Speaker and was introduced to WiFi speakers, “cheap” multi-room audio and AirPlay for the first time. Since then, it’s been a fun ride. I’ve added Apple smart speakers, DIY Amplifiers, a WiFi Radio, a Subwoofer, an iPod HiFi and PMAP and they all seamlessly work together using AirPlay.

Now, after working on many projects that use it, I’m writing my “missing” introduction to this technology.

What is AirPlay?

Via Wikipedia, “AirPlay is a proprietary wireless communication protocol stack/suite developed by Apple Inc. that allows streaming between devices of audio, video, device screens, and photos, together with related metadata.”

So, it’s Apple’s all-in-one name for audio and video streaming, usually over a local network.

In my projects thus far, I’ve only used the streaming audio component so for the rest of this post, when I mention AirPlay (sometimes shortened to AP), I’ll be exclusively referring to it in the context of audio streaming.

HomePod mini (supports AirPlay) (Image Credit)

What devices support AirPlay?

AirPlay is supported across most Apple devices and many non-Apple speakers and receivers.

Sending

iPhone, iPad, Apple TV and Mac* devices can send AirPlay streams.

*Macs can only send system audio to a single receiver (except to HomePods when they are set up as a stereo pair). Apps on macOS (eg. Apple Music) can send audio to multiple speakers (ref Apple).

Receiving

Apple TV, HomePod, Mac, AirPort Express and third party MFi devices can receive AirPlay streams.

These are what Apple allows AirPlay receiving on 😉. But more on that later..

AirPlay Versions

The main difference (for most users) is how many devices you can stream to. AirPlay 1 (AP1) supports streaming audio to a single device. AirPlay 2 (AP2) supports streaming to multiple devices, is backwards compatible with AP1 and is the current AP version.

Apple doesn’t (generally) differentiate AirPlay versions and just refers to the current (AP2) version as “AirPlay”. All post-2018 Apple devices (running the latest software) that support AirPlay (see previous section) should support AP2.

Non-Apple devices with official AP2 support will have this logo (usually on the box):

Multi-Device Streaming

You can stream audio to multiple devices if your sending device and all receiving devices support AP2. eg. You can send music playing on Spotify from your iPhone 15 to two HomePods, a HomePod mini, an Apple TV 4K and a Sonos Era 300 simultaneously.

Apple’s guide covers how to do this.

AirPlay Sound Quality

AirPlay 1 – Audio is converted to 16bit/44.1kHz ALAC (ref Darko.audio) on the sending device and then sent to the receiver.

AirPlay 2 – Depending on the combination of app, sending device and receiving device/s it could be 16bit/44.1kHz ALAC (lossless) or 256kbps AAC (lossy) (ref Darko.audio). Here’s a video version of the link:

This means that playing >16bit/44.1kHz audio over AP doesn’t really make sense. Your device is downsampling it to (at best) 16bit/44.1kHz before sending it.

Specifically with Apple Music, since it’s AirPlay 2 bitrate is 256kbps AAC, streaming “Lossless” or “Hi-Res Lossless” is kinda pointless. Here’s a worst case rough calculation:

If you’re streaming a “Hi-Res Lossless” 24bit/192kHz track, that’s pulling at least 9216kbps (±9.2Mbps) from your internet connection. This will be processed down to 256kbps AAC before sending over AP2. So ±97% of your internet data is wasted in the conversion.

That being said, I won’t discount experiencing a subjective, psychoacoustic (read: it’s all in your head) benefit to streaming at a higher quality than AP can handle. Does seeing “Hi-Res Lossless” make it sound better? No, but also maybe. Psychology is weird.

AirPlay vs Bluetooth

AP > BT in these areas:

  1. Sound Quality – Taking the previous section’s caveats into account, and assuming 16bit/44.1kHz ALAC, AirPlay can send audio at a higher bitrate and with lossless encoding vs AAC over Bluetooth on Apple Devices (ref SoundGuys).
  2. Simultaneous synchronized streaming to multiple speakers (AP2)
  3. Separated Audio streams – All device audio isn’t sent over AP thus it’s possible to take a call or even watch a video on your iPhone while simultaneously playing music to multiple AirPlay devices.

However, Bluetooth wins in a significant area, audio lag:

Unofficial Airplay Devices

Quoting something I mentioned in 2022:

“To build a device (speaker, screen etc) that can receive an AirPlay stream, you’ll need to be a manufacturer and apply to become a member of Apple’s MFI program. Well, that was until the (audio portion of the) Airplay 1 protocol was reverse engineered.”

and then:

“AirPlay 1 allows streaming to a single speaker but in 2018, Apple released AirPlay 2 which can stream to multiple speakers. Since then, the work has proceeded to reverse engineer AirPlay 2. A few weeks ago, shairport-sync received a really big update, AirPlay 2 support was here!”

The shairport-sync software allows any device (of sufficient processing power) running Linux or FreeBSD to receive AirPlay streams. So, you can build your own AirPlay receivers.

Also, if Apple makes any breaking changes to the protocol, it could also stop official non-Apple devices from working properly. That’s why it seems (to me) like the DIY AirPlay Pandora’s box won’t be closed and we’re free to have fun.

 IKEA Symfonisk bookshelf speaker (supports AirPlay) (Image Credit)

Why did I choose AirPlay?

Delving into home audio came as an extension of my smart home adventures. I would have preferred a non-manufacturer-specific protocol but since we predominantly use Apple devices and shairport-sync exists, AirPlay it is.

My projects that support AirPlay

If you want AirPlay on your:

A notable omission is “Active Speakers/Amplifier with Aux in” that uses Raspberry Pi for AirPlay. I’ll leave that one as an exercise to the reader 😃.

Shout Outs

All my DIY builds use Raspberry Pi single board computers running moOde (except PMAP). They all depend on the excellent shairport-sync project for AirPlay support.

Raspberry Pi 4B (also supports AirPlay) (Image Credit)

Conclusion

AirPlay for audio is cool. Building my own AirPlay audio receivers is cooler. Having my DIY builds and official devices all work together seamlessly is the coolest.

Good sound quality, whole home synchronized audio and seamless integration with my Apple devices. It’s part of my audio dream coming true.

The downer is that AirPlay equals vendor lock in. There’s no official support for AirPlay on Android and Windows so you’ve gotta stick with Apple or use third-party applications to send AirPlay streams to your speakers from those platforms.

To avoid the lock in, I’m going to continue building my own WiFi speakers. Having them Raspberry Pi-based means they can support any protocol if the code is available and compatible with Raspberry Pi OS.

The Future

The future of AirPlay as a protocol? I’ll leave that to the smart engineers at Apple.

Your future home audio setup? Well, you’re in control. If it makes sense, buy some AirPlay speakers and put them around your home. Better still, follow my guides and build your own.

As for me, there’s always the next audio project…

If you have any questions/would like to share your experience with AirPlay and DIY Audio, leave a reply below. To receive an email when I publish a post, subscribe here. Contact me directly using these platforms.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑