MacBook Pro & Ableton – variable audio latency

Today I was attempting to determine the hardware audio latency of a MacBook Pro (late-2009 model, 2.8GHz dual-core 17″). This was to plug in to the Driver Error Compensation setting under Preferences > Audio in Ableton Live 8. I was following the Driver Error Compensation tutorial that ships with Live, and hooked the headphone output to the line input on the side of the MacBook. I used a straight-through 1/8″ TRS cable – two of them, in fact, which I also verified for correct wiring with a meter, after discovering a few disturbing facts.

MacBook Pro audio latency, tested with Ableton Live

MacBook Pro audio latency, tested with Ableton Live

First, something is out of phase, either the input or the output. When the output waveform zigs up, the recorded waveform zags down. That could be troublesome in certain circumstances.

Significantly longer latency, after disconnect/reconnect!

Significantly longer latency, after disconnect/reconnect!

Second, the actual latency changes every time you disconnect and reconnect the cable plugged in to the headphone jack. Apparently, the Mac is reconfiguring its drivers, so that it knows what’s connected where, or something. But when it does this, the latency changes! A lot! While the cable is connected, it doesn’t seem to vary, but since the connector is so delicate (and over-engineered, sigh..) it is easy to accidentally dislodge the cable a tiny bit, which is enough to trigger this problem.

Each of the two screenshots above show the playback waveform (top) and the recorded waveform (bottom). You can see the phase difference, and I included two examples that were on the more extreme ends of the range of latency. The time scale along the bottom is in fractions of seconds. You can see that the latency has changed from approximately 0.0025s to 0.0225s – that’s a 20ms difference! Why the heck does it do this?

Moral of the story: buy a professional audio interface for any serious recording work.