|Apr 13, 2011, 05:12 PM||#1|
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 05:21 PM.
|Sep 13, 2012, 01:19 PM||#2|
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?
|Thread Tools||Search this Thread|
|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 09:53 AM|
|1st Gen Apple tv 2nd Gen Airplay/AirTunes AirPort Express not working||Bryank||Apple TV and Home Theater||0||May 1, 2013 04:16 AM|
|AirPort Express (2nd Generation) - AirPlay (over WiFi) lags / audio interruptions||endrju83||Mac Peripherals||2||Feb 18, 2013 03:53 PM|
|AirPlay and optical audio: Apple TV vs. Airport Express||Puonti||Mac Peripherals||3||Nov 28, 2012 10:13 AM|
All times are GMT -5. The time now is 11:54 PM.