USB Audio From An iPad...
From the original Analog Industries archive. Some links and images from that era no longer resolve.
This post is more for the benefit of people searching for this information than regular readers, who (I assume) already know this. I conducted some experiments with this a few days ago for an article I was writing for CM, and have since figured out some new things, so I thought I’d share them.
Q: Can I use a USB audio interface with an iPad?
A: Yup. There are some caveats, and they need to be paid attention to, but in general it Just Works.
Q: Caveats? You’re gonna drop Latin in to this shit?
A: That’s how I roll. Seriously, though, as far as my experimentation shows, the following information is true: first, the interface has to be class-compliant. That means that it needs to work in an OS X computer without a driver install. Second, it has to be USB1.0-compatible. No USB2.0-only interfaces. And finally, it has to either use less than 200ma of power or be externally powered.
Q: Hold on, let me get my… what?
A: A safe rule of thumb is that if it has mic pres (especially if it’s able to provide phantom power) it’s going to need a wall wart or something.
Q: Okay. Got it. What else do I need?
A: Pop over to the nearest Apple store and get yourself a Camera Connection Kit. This otherwise useless US$39.00 adaptor plugs in to the 30-pin docking port and gives you a USB port, ostensibly for hooking up cameras that have only on-board memory. As a camera connection kit, it’s kind of stupid, because you can buy SD cards now that have as much storage as even a maxed-out iPad, so I’m unclear as to its stated purpose and the usefulness thereof. But as an audio adapter, it works fine.
Q: Okay. Last question. Does every audio app just shit its sound out the interface when it is plugged in?
A: Nope.
Long answer: there are several ways to give a program sound in Cocoa Touch. These are, on the whole, the same ways as in OS X proper. You can use OpenAL, but that’s just a sample playback engine, really. There is also a system sound engine, or you can programically access the part of the OS concerned with playing back MP3s/AAC/whatever if you’d like. The final method, and the one that gives you bit-level access to the outputs, is to talk to CoreAudio, just like in OS X.
This final method is poorly documented and hideously complex, and even big companies fuck it up occasionally. But this is, as far as I can ascertain, the only method by which the USB outputs are utilized.
So, long story short: any App that uses CoreAudio for its playback, and does a good job of using it, automatically shunts its inputs (if it has ’em) and outputs to the USB device. Applications that use OpenAL (games for the most part, but some audio programs like the ridiculous-bordering-on-stupid Magic Piano, and many sample playback apps of that ilk) send the audio to the headphone jack or the onboard speakers only. Apps that use the system sound engine or access the iTunes library in some crafty way also can’t access this method.
One exception to this rule is Korg’s iElectribe. As I said, CoreAudio in Cocoa Touch is incredibly complicated and poorly documented, and even big companies mess it up. iElectribe is an example of that. iElectribe _must_ use CoreAudio; it wouldn’t work any other way. However, when a USB audio device is plugged in, iElectribe crashes on start-up. This will no doubt bum some people out.
And last but not least: all that shit I said about the iPad above? It also applies to the iPhone. (And I assume the iPod Touch, although I’ve not verified this.) I will say, however, that I have OS4 in my iPhone, so I can’t say for certain that it works with OS3.1. If someone has a CCK and an iPhone with OS3.1 and wants to verify this, that would be cool.
EDIT: I just tried it with my wife’s iPhone, which is running 3.1, and it DOES NOT WORK. So if you were planning on going to get a Camera Connection Kit just to use audio from your iPhone or iPod Touch, you need to wait until OS4 is released for this to work. It works fine with OS4, though, essentially the same as with the iPad.
Comments
Comments are closed on this post.