Sorry for the drop; Keagan broke his elbow last week (no, the other one), and that blew a pretty big hole in my @keyboard time.
One of the epiphanies in the iPhone SDK is in discovering how the iPhone’s development contributed to Leopard. Remember, Leopard got delayed six months so Apple could finish up and ship the iPhone. Various self-styled analysts attributed ulterior motives to the delay, but in retrospect, it looks like what really happened is that a number of technologies were developed for both the iPhone and Leopard.
Bill Dudney, author of the Prags’ upcoming book on Core Animation talks about this in the most recent Pragmatic Podcast, pointing out how CA was developed for the iPhone, and then brought to Leopard. It takes a little work for me to figure out the chronology of that, given that I attended a CA session at Leopard Tech Talks Atlanta in January 2007, but by that point, the iPhone had been announced and its prototype demoed, so its low-level frameworks could surely have been put together by then, to allow for the first batch of apps to be written atop them.
Bill’s working on an iPhone chapter for his Core Animation book, but presumably won’t be able to release it until the NDA releases in June. On that note, I’m pleased to have been a tech reviewer for his book, and it’s a solid trip through CA, starting with the easiest stuff you get more or less for free, and continuing on through greater and greater levels of programmatic involvement with animation and the “layers” that implement them. His last chapter (in the current beta) covers QTKit integration, putting movie playback and video capture into CA layers, allowing you to effect and animate them easily. I helped Bill work through an issue regarding DV camcorders (see the stuff about “muxed” devices in my multi-cam capture stuff), and there may be a PowerPC-only repaint issue that could become a bug report or ADC support request, but all of that should be handled before any readers need to worry about it.
Dang, I owe Bill a back cover blurb too.
Speaking, in a roundabout and non-NDA-compromising way, about the iPhone, it’s not a secret that Core Audio is present on the device: it was listed as one of the frameworks in the SDK special event. Right now, I’m trying out some stuff with its Leopard equivalent, particularly a nice new API called Audio Queue Services. For handling streaming audio, it uses a queue of buffers, and a callback scheme: if you’re writing… oh let’s just hypothetically say one were to write a Shoutcast-style MP3-over-http client (maybe because one did just that with Java Media Framework and abandoned it when Sun pulled MP3 out of JMF)… if you were writing such a thing, you’d just register for callbacks when the queue wants you to fill a buffer. Once it has one buffer, it can start playing (you can also schedule the playback for a specific time), while at the same time it’s calling you back to fill the next buffer. A sample app works fine with Shoutcast streams that I dumped to the hard drive — MP3 only though, no HE-AAC — so I’m pretty confident that it can work just when the callback implementation is wired up to an http stream. At least on Leopard. As for the iPhone, well, that’s all NDA’ed for now, isn’t it?
Oh, and I just discovered CBC Radio 3 has a Shoutcast feed and is in the iTunes Radio listing. Totally awesome, and way more practical than the Flash widget on their web page.





Leave a comment
You must be logged in to post a comment.