this space intentionally left blank

July 30, 2008

Filed under: music»tools»digital»daw

Waiting for WaveRT

One of the features that Vista was supposed to introduce, and which audio professionals were cautiously optimistic about, was a new kind of driver model meant to provide low-latency, sample-accurate sound. Windows has always had low-latency sound, but it's gone either through the WDM/Kernel-Streaming drivers, which are kind of a hack, or ASIO, which is a third-party driver standard created by DAW maker Steinberg. Windows has never had a built-in, professional-level audio subsystem the way that OS X has Core Audio and Linux has... well, whatever the hot new Linux audio API is this week, most likely JACK on top of ALSA. So an upgraded sound layer for Windows, one that would offer both ubiquity and performance, was welcome news.

Still would be, actually.

Now, I'm generally bullish on Vista, so don't get me wrong: I do appreciate the new sound mixer, which offers per-app mixing and better quality than the old mixer. I dig the multimedia scheduling process, so media playback is more reliable than it was previously. And driver support for the old standards has reached entirely satisfactory levels--I'm not lacking for external interface support any more. But the new driver model, WaveRT, shows no signs of being able to replace ASIO or WDM/KS on my laptop, for a couple of reasons.

The first cause for concern is that the driver model for WaveRT wasn't designed correctly in its initial incarnation. When digital audio is output from a sound card, it comes from the front of a buffer of samples on the card. Applications periodically refill the buffer by adding new samples onto the end. If they don't add samples before the buffer empties, the soundcard runs out of gas, so to speak, and the result is skipping or popping audio playback. Most driver models, like ASIO, include a mechanism for the hardware itself to notify the software when the buffer is running low, so it can be topped off.

WaveRT's original implementation, as these posts from Cakewalk tech guru Neil Borthwick explain, did not use a notification mode for some incomprehensible reason. Instead, it required the audio software to poll the audio hardware--to manually check on the status of the buffer. What sounds pro-active is actually problematic, since real-time audio works typically uses buffers as short as 128 samples, which on CD-quality audio means that the buffer empties itself more than 300 times a second. Under the polling mode, therefore, the CPU spends a large amount of time checking the status of the sample supply instead of using that time to render audio. Inevitably, samples go missing and quality suffers.

Late in Vista's development it became obvious that this polling-based model was unworkable, and Microsoft added a notification mode similar to ASIO or Core Audio. And apparently it works great--although WaveRT is unavailable for FireWire or USB devices, users report that for onboard or PCI-based solutions, they get very stable, very low latencies. Onboard sound, of course, is hardly a substitute for a pro interface, but for mixing/composing on the go, it does just fine. Cheers all around.

Unless, like me, the OEM who built your computer hasn't updated their sound drivers to include notification mode, in which case you're basically back to using WDM/KS and ASIO, if possible. Worst case scenario, and I'm looking right at you, Analog Devices SoundMAX HD, the driver doesn't even support sample rates other than the oddball 48KHz using any driver modes, and so you're basically locked out of using onboard sound for any production at all.

Unlike graphics cards, where drivers are available directly from the hardware manufacturer (with the caveat that a modified INF may be required), audio drivers are usually "firewalled" behind the company that designed the computer. I can get a generic driver from Nvidia for my Quadro 140M card (and I have, since it doubles the framerate in Stalker and Sins over Lenovo's latest version), but for audio features I'm basically stuck until Lenovo gets around to it. There is no generic SoundMAX driver to download, a symptom of both the sad state of laptop sound and the lack of a decent audio hacking community.

To their credit, when I filed a request to find out about the availability of updated drivers, Lenovo promptly called me back for clarification and told me that they'd be sending a note on to their technical hotline. It's not as helpful as actually getting my hardware to function properly, but they were at least very nice about it. Score one for the service contract, perhaps.

The blame here is threefold. It's Microsoft's fault that they didn't get WaveRT into workable shape from the start, since audio buffers are a solved problem. It's Analog Device's fault that they either haven't written a compliant driver or they refuse to release it. And it's Lenovo's fault for lagging in their own driver updates. No doubt the audience for Thinkpads is a bit thin among media professionals, making it a low priority for support staff. But the machine is exemplary by other standards: fast, stable, tough as nails. It is unfortunate--although par for the course in this industry--that its audio capabilities can't live up to what's been promised.

Future - Present - Past