Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread Display Modes
Old Apr 13, 2011, 04:12 PM   #1
macrumors regular
Join Date: Aug 2006
Airport Express (Airplay/AirTunes Audio) emulator for iOS

I'm working on a project to port the recently released Shairport tool that emulates an Airport Express to iOS and Mac OS X. (Disclaimer: this app is for personal use since it uses a leaked private key, I have no intention to release it on the app store). Ideally, my app will be more of a framework or library that anyone can use for their apps. Shairport is written in Perl/C so it is not suitable for "user-friendly" deployment to iOS and Mac OS X. My app will use OpenSSL for the AES and RSA encryption, ASyncSockets for HTTP and UDP networking, and nothing else. The idea is to make this a native app, no perl, no avahi, no libao, no software ALAC decoder.

As of now, I have the secure handshaking aspect of the RAOP protocol working as well as native Bonjour/Zeroconf/mDNS/Whatever you want to call it broadcasting working. I am able to respond to the RTSP requests OPTION, ANNOUNCE, and SETUP. iTunes will see my app as an Airport Express in the AirPlay list and will begin streaming audio in ALAC format to the app. I am successfully listening on the 3 UDP ports specified by the SETUP request, however, I'm at a bit of a loss on how to decrypt this with the AES keys from the SETUP request and how to feed this into CoreAudio.

Couple of questions to the community:

1) Are you working on anything similar, if so, perhaps we can collaborate? I would have no objections with starting an open-source project around this, however my code is at the uber-early proof of concept stage at this point.
2) Do you have experience using CoreAudio and the AudioFileStream format, if so, do you have an example you'd be willing to share?
3) Have you ever streamed audio to an Airport Express before? Is it a straight-up ALAC bitstream that reads bits from the file and spits it out as UDP packets? Are the headers intact?
4) Do you have an understanding of what the timing port and control ports are used for?
5) Have you looked at the shairport source code? Can you offer insights on how much of the back-end server and ALAC decoder code can be replaced by CoreAudio?

Last edited by MikeNemat; Apr 13, 2011 at 04:21 PM.
MikeNemat is offline   0 Reply With Quote
Old Sep 13, 2012, 12:19 PM   #2
macrumors newbie
Join Date: Sep 2012
About to wade in, have you done anything?

Mike, I'm about to start working on this. I've downloaded the latest shairport and am considering just doing a machine port to the Mac (it's been done, but basically hop over libao and go straight to Core Audio), although I like your idea of a compete re-write. I've had quite a bit of programming experience at the IP layers and built very complex systems, although I haven't had much experience with Bonjour, etc. I'm looking forward to the challenge.

That said, if you've made any significant progress in this area, I'm happy to take a look at your code and, possibly, extend it.

I think anything done has to ultimately be open source and certainly cannot be sold, so I agree, this cannot be a money maker. Nonetheless, I think quite a few people would find all of this useful.

Please contact me. Not sure how we can trade emails without placing them on this board. Friending?
codeedog is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Streaming live Audio from Airport Extreme to an Airport Express (not iTunes/Airplay) marku5 Mac Peripherals 10 Sep 4, 2013 08:53 AM
1st Gen Apple tv 2nd Gen Airplay/AirTunes AirPort Express not working Bryank Apple TV and Home Theater 0 May 1, 2013 03:16 AM
AirPort Express (2nd Generation) - AirPlay (over WiFi) lags / audio interruptions endrju83 Mac Peripherals 2 Feb 18, 2013 02:53 PM
AirPlay and optical audio: Apple TV vs. Airport Express Puonti Mac Peripherals 3 Nov 28, 2012 09:13 AM

Forum Jump

All times are GMT -5. The time now is 03:29 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC