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?
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: