When I built my musical Pi one of the loose ends was being able to stream audio from Windows to the speakers. The quick answer to this is Airfoil, it worked first time and appears to stream reliably over Wifi to shairport running on the Pi.

In fact the streaming seems more reliable than PulseAudio does out of the box. When streaming via PulseAudio I get occasional drop-outs in the audio, which I've yet to experience with the Airfoil/shairport combination. I've not yet spent any time playing with the settings for PulseAudio, so there are certainly some parameters to tweak that may help. RTFM!

Options

There are several bits and pieces of open source code out there:

  1. Airport Express Streamer (oAEP)
  2. https://code.google.com/p/airplay-streamer/AirPlay Streamer
  3. Stream What You Hear

Most of them either crashed repeatedly or didn't do anything useful first time around.

DIY

I've not been a particularly active Windows user at home for quite a few years now, but there is a sound card feature called Stereo Mix.  This is a capture device that gives you direct access to the audio currently being played.

The problem with this is that you can still hear the audio on the laptop and the local volume affects the level of the signal that is sent.

I'd like to revisit this at some point, maybe with a view to using PulseAudio rather than AirTunes streaming. My initial thoughts on how to proceed were to write a sound card driver to capture the audio, but Airfoil appears to do something different. Airfoil can be configured to capture audio on a app by app basis, which is very useful - music goes to the hifi and notification sounds don't.

A rainy day project!

One thought on “Airfoil and shairport on a Raspberry PI

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required