Send audio from QTMovie over internet
I have a simple audio playing app that uses QTMovie for a few of it's features. I'm also developing a little ethernet-enabled board to stream MP3 or PCM data to.
Is there any way of 'grabbing' what QTMovie is outputting, format it into an array of bytes and send it over ethernet to a specific IP? Somehow iTunes manages to do this with AirPlay, so there's some sort of way to do this.
Thanks for any开发者_运维问答 answers!
There are off-the-shelf products like Rogue Ameoba's airfoil that you might want to look at:
http://www.rogueamoeba.com/airfoil/mac/
But if you really want to get your hands dirty and develop something yourself, it looks like QTMovie just outputs to Core Audio, and you can set which device:
http://developer.apple.com/library/mac/#qa/qa1578/_index.html
There's a bit of Q&A on the topic of how programs that intercept Core Audio devices do that:
Code sample for capturing audio from a Mac in Cocoa and saving to file?
精彩评论