Thursday, May 22, 2008

Vista Audio Playback, Part 2

I've been pretty busy lately, so haven't had time to post any articles. Earlier today I received a nice email from someone (won't mention names unless I have permission) who's also a big HTPC proponent. He mentioned that he's been following Amplio Audio and anxiously awaits updates on our amps and our next article about Vista audio playback. Well, that was the kick in the ass I needed.

BTW, if you read an article that you would like me to follow up on, or have any questions, please feel free to use the comments at the end of the posts. I realize that most people are comfortable with email, but I'd like to see these articles become more of an open conversation that anyone can contribute to.

Anyhow, back to the topic... In the original Part 1 article I mentioned comments I read in a thread on diyAudio titled "Is Vista really capable of bit perfect output?" The original poster started by explaining that the sound quality when playing audio/music with his computer was better than using his expensive dedicated audio components. There are a couple of reasons some may believe a computer based audio system can never sound as good as dedicated stand-alone components. One is that the computer is just too electronically noisy to pass an analog signal without some distortion. The second reason is that the computer software and/or operating system modifies the audio data before passing it to the soundcard and DACs, thus distorting and/or damaging the sound quality.

There are several ways to avoid the first problem. One is to purchase a good quality soundcard that is properly shielded from any electro-magnetic interference. The other is to use a product who's analog circuitry is external to the PC. All FireWire and USB based soundcards fall under this category, as do a new generation of USB DACs. The product Amplio Audio is working on falls under this category as well. Up to this time, we have been using FireWire and it still proves to be the best technical solution.

The second problem is a little more complicated. Sound degradation caused by the operating system was true with Windows XP and standard WDM drivers. XP's audio engine relied on a mixer (KMixer) that would resample all audio to 48 KHz so everything output from the PC would use the same sample rate. There are some ways to avoid resampling, but if you adjusted the volume or simultaneously allowed sound output from other applications (including system sounds), resampling was performed. That means the CD's 44.1 KHz sample rate was always converted to 48 KHz. Another problem with this audio engine was that to lower the sound volume, the data was simply truncated to a lower resolution. So 16 bit audio was reduced to 14, 12 or 10, etc., bit data to get a lower volume. This can dramatically decrease the sound quality.

This is where the thread then moves on to the bit-perfect discussion. To avoid degrading the sound by modifying or truncating the bits, you could use a driver like ASIO that bypasses the Windows audio engine so that the original source audio data is not changed all the way to the DACs. This is how you could get bit-perfect output. Of course the software players had to provide support for these sort of drivers. Windows Media Player or Windows Media Center do not. So you had to use other players like J.River's Media Center, Winamp (with a special ASIO plug-in), Foobar, etc., to achieve bit-perfect performance. Now with Vista, a couple things have changed. First, the audio engine is much better. Even if the audio is resampled, the algorithms are much better and the effect on sound quality is not nearly as bad as what happened in XP. They've also improved the volume control so that they no longer truncate the bits to reduce sound levels. Instead, it converts the data to 32-bit floating point, then performs the volume adjustment calculations and then converts back to the original sample rate. This basically gives you lossless attenuation. It's not bit-perfect, but there is no degradation in sound quality. Some dedicated audio hardware that uses high quality DSP chips use this same technique. For the purist, who still want bit-perfect operation, they can still use ASIO drivers if they've been updated to work under Vista. These drivers will also bypass the audio engine, just like they did with XP. Vista also supports a new feature called "exclusive mode". Exclusive mode also bypasses the Vista audio engine and will provide bit-perfect playback. However, you need an application that supports exclusive mode and most I'm familiar with, like J.River Media Center, Windows Media Play, Vista Media Center, Foobar, etc., don't.

Getting back to the diyAudio thread, the bit-perfect discussion mentions that there is a newer software player, called XXHighEnd, that uses Vista's exclusive mode. There's another program called XMPlay that can run in exclusive mode when using a WASAPI output plugin. The sound output from a program using an ASIO driver or running in exclusive mode should be identical, because bit-perfect is bit-perfect. However, several people, including the original poster and the developer of XXHighEnd (not the same person), claim that XXHighEnd sounds better than other bit-perfect solutions. In fact the original poster was also a big fan of using Foobar with ASIO drivers, and he claims the sound has improved a lot when using XXHighEnd. When asked how something that outputs the exact same data can sound better, the developer doesn't provide any answers that satisfy the skeptics. The closest he comes to any technical explanation is that he does something to minimize jitter. But that doesn't make much sense given the way the audio chain works. If the audio data is buffered and the DAC is driven by a local clock, the audio software player shouldn't have any effect on jitter. He also admits that he doesn't know why it sounds better, but that there are many ways a software application can have an effect on the audio quality and he's just been tinkering around trying to find the best sound quality. That's where things get confusing to me. Or as another poster/skeptic put it:
  1. It's bit-perfect
  2. PCM needs to be processed some special new way to sound best
  3. No, it's bit-perfect
  4. If you were to, say, play a byte later in the stream than it was originally, that might be useful
  5. No, really, it's bit perfect!
  6. You're mucking around with the data based on some theories you have that you won't explain and if we don't just accept that it is bit perfect and magically sounds better than we are just mean, old unbelievers.
  7. Oh, and it is bit perfect.
The developer of a kernel streaming (KS) output driver, which is also achieving bit-perfect performance like ASIO drivers, compared the output from three different bit-perfect solutions - Foobar2000 with his KS output driver, XMPlay running in exclusive mode and XXHighEnd running in exclusive mode using it's third engine. Using an oscilloscope, he found that the output was identical. They are all bit-perfect. He also says he cannot hear any difference, so he doesn't recommend the XXHighEnd software because they charge for it (and Foobar2000) is free, the user interface is pretty weak and the program is immature. Like I said, others, including the original poster, claim it sounds better.

I have to admit, if it sounds good to you, I'm not going to try to convince you otherwise. I'm also not convinced bit-perfect output is the only acceptable way to listen to audio. Especially since Vista is not bit-perfect, unless you use exclusive mode, but it still sounds great because any changes are lossless.
Powered By Blogger