Optimising Windows Audio Playback

Page 3 - Seeking answers? Join the What HiFi community: the world's leading independent guide to buying and owning hi-fi and home entertainment products.
A

Anonymous

Guest
Thanks for the info. This is when the volume is set at 100% and an even L/R balance in kmixer?
 

kinda

New member
May 21, 2008
74
0
0
Visit site
Hello,

Good thread with some useful information. I wondered if I could ask a couple of further questions, and hope the answers may also be useful to others.

If I used a motherboard with a coaxial digital audio connector with XP, presumably I just need to ensure KMixer doesn't alter the sound and then it should appear at the digital out unmolested? Or does the onboard audio need to have specific features?

Also, are any of the Windows problems relevant with Linux? If I used Linux with a motherboard with digital out, could I be assured of a bit perfect output, or are there just other problems to look out for that may affect the stream?

I've read a fair bit around this on the internet, but never seem to find defnitive answers, so any advice would be much appreciated. I'd like to build a little music server, but am never 100% sure which hardware and OS would be OK to use.
 
A

Anonymous

Guest
Pete10:Thanks for the info. This is when the volume is set at 100% and an even L/R balance in kmixer?

Sorry, should have said. Yes, that is assuming 100% volume and even balance. I've no idea how much changing these within windows affects the sound, but it's not something I would leave to windows
 
A

Anonymous

Guest
Ok. Does anyone know where the volume and balance settings are stored? The sndvol32 sliders are rather crude and perhaps it is a good idea to lock the (ini?) file with the right values for volume and balance. I dumped the asio driver in MediaMonkey, as gapless play did not work, so it is good to know that the kmixer route is also a good option.
 

PJPro

New member
Jan 21, 2008
274
0
0
Visit site
toasties:
I've just read this thread and there seems to be some misunderstanding (although a very common misunderstanding). KMixer does not re-sample all audio to 48Khz. It only resamples if it has to mix more than one audio stream. A single audio stream will be let through unaffacted. If it re-samples it will re-sample to the highest sample rate of the audio streams, and not automatically to 48Khz. If you only play only one audio stream and have a soundcard which can output at the sampling rate of the stream, then the audio will pass through the PC bit-perfect. This has been reported by Microsoft and has been tested and confirmed elsewhere. Kernal Streaming and ASIO will improve latency, but they will not affect audio quality. It can be easily confirmed by passing through DTS to a received, which, if the audio was resampled, would fail

toasties, thanks for the clarification. Yes, I have had a browse through MSDN and it appears to backup what you say. However, I have also seen conflicting evidence which suggests that the KMixer does indeed manipulate bits, even when set to full volume. Interestingly, this was exposed when passing through DTS.

Here's an interesting quote from Black Magic (Windows Core Team) on the AV123 forums

"The KMixer is necessary in XP. It allows for the mixing of multiple audio streams at different sampling frequencies and bit depths. It also controls the volume of the output. The KMixer is not bad in and of itself. Most people can't hear what the KMixer does to sound, but they fear it none the less. I had a lengthy discussion on this topic a couple of years ago on the AVSForum. Someone wrote an app that did an ABX test with the KMixer and bit perfect audio stream. I don't recall anyone passing the test with a good statistical relevancy.

The KMixer doesn't convert 44.1k to 48k across the board. It or the hardware can convert sampling rates based on what is supported. If your audio card supports 44.1k, then the KMixer can connect to it at that sampling rate. What happens after the audio stream is handed off to the card driver is another thing. Older Creative cards only handled 48k sampling frequencies, so the KMixer had to connect at that sampling rate (hence it handled the sampling rate change) or the card converted internally (often hidden by the manufacture).

This whole bit-perfect controversy came about because of DTS Audio CDs. A DTS Audio CD uses a non-standard header ID on the CD. Back in the day DTS didn't get an official ID (for whatever reason), so they marked their CDs as PCM audio. It was up to the software player to read the first bits of data in the PCM stream to determine if it is PCM or DTS encoded data. Players like Windows Media Player didn't support DTS Audio CDs, to it read the track correctly as a PCM track. It sent the audio stream to the KMixer for mixing and volume. This is where the KMixer was exposed for bit manipulation.

The KMixer uses integer math to apply volume control. At the time, this was the least amount of overhead for this operation. Due the limitations on the architecture, full volume was just shy of what you would expect as bit-perfect. It reduced the output volume such a small amount that no-one would ever hear it, until DTS CDs came along. This slight manipulation of the volume would destroy the DTS encoding (The KMixer only operated on it because it masquerades as PCM Audio). The output would be a completely garbled mess. This demonstrated to everyone that the KMixer wasn't bit perfect. It's not, but the every so slight volume manipulation would not have been noticed had it not been for the DTS Audio CD.

If you are not using DTS Audio CD, then I really wouldn't worry about it too much. If you have a DTS Audio CD, then you can play it with a software player that is compatible with DTS Audio CDs. These players detect the DTS Audio stream and connect to the SPDIF port and bypass the KMixer.
All of this has been changed in Vista. The KMixer is no longer there, but we still have a mixer (it kind of necessary). The Mixer now uses floating point math. Vista also offers applications Exclusive mode (bypass mixing)."

Certainly in XP ASIO and kernal streaming were principally developed for PC users into music production where latency is a major issue. Black Magic seems to suggest that the bit manipulation being performed is soooo slight that it is inaudible. I haven't tried any of this on XP myself, so cannot comment on his assertion. I'll let the reader decide whether they can detect a difference or not.

What I would say is that issues with the audio architecture have been recognised by MS, hence the revised architecture for Vista. There is still a mixer but with a different implementation and interfaces provided to bypass it (WASAPI).
 
A

Anonymous

Guest
Why on earth they would apply a slight volume reduction at 100% eludes me. Or why they did not correct this it in a later driver update. Anyway, it is difficult to do ABX comparisons as switching drivers takes time, but I can compare both with the CD source. No significant difference to me. Maybe it is time (for me at least) to stop worrying about it.
 

PJPro

New member
Jan 21, 2008
274
0
0
Visit site
Pete10:
Why on earth they would apply a slight volume reduction at 100% eludes me. Or why they did not correct this it in a later driver update. Anyway, it is difficult to do ABX comparisons as switching drivers takes time, but I can compare both with the CD source. No significant difference to me. Maybe it is time (for me at least) to stop worrying about it.

If you can't hear a difference, don't worry about it.
 
A

Anonymous

Guest
In the mean time I've bought an ASUS netbook and it works fine with no hickups, with the standard MediaMonkey driver and no special tweaks. It is silent enough to be the main music source, the fan can be heard from a short distance, but it's not obtrusive. One question: I've switched off the Windows (warning) sounds, but is there a way to prevent other applications from using kmixer and producing sounds through wave out (warning sounds, but also internet pages that play sounds or music)?

Thanks,

Pete
 

PJPro

New member
Jan 21, 2008
274
0
0
Visit site
What you're looking for is exclusive mode. This is available using WASAPI on Vista but I don't know about XP and ASIO. It's unlikely that the standard Media Monkey driver will provide this and it doesn't look like there's a new driver on its way.

Why not use foobar2000? I can see no reason to use any other audio player unless you've got a mac.
 

Dazmb

New member
Aug 26, 2007
57
0
0
Visit site
PJ, reading this thread you have got me curious about improving my PC sound. But let me start with a quote from Hydrogen Audio Wiki about bit matching:

"Impact on audio quality
Quality gains are questionable at least. In most cases the differences are irrelevant unless the output is digitally captured back and needs to be bit-exact for further processing."

&

"Impact on latency
Bypassing Windows Mixer typically results in lower latency between decoding/rendering and output, though Windows Vista allows low latency playback through WASAPI shared mode without bypassing the mixer.

Note that low latency playback is relevant to real-time processing and editing only. It's completely useless for music playback; in fact, higher latency is better in this case as it gives better protection against glitching from buffer underruns"

So why bother with ASIO or KS or WASAPI?

You are very pro Foobar - is it better than MediaMonkey? Computer Audiophile website reckon MM is the best.

I have a standard Creative Xi-Fi card which has it's own bit-match capability (but I don't use it as it only works with WAV's for some reason). It does have a SPDIF output, but i'm not using that at the moment as I'm going analogue straight into my AE Aego 2.1 amp. I guess have to get a DAC right? Are there any half decent cheapies

Cheers.
 

PJPro

New member
Jan 21, 2008
274
0
0
Visit site
Dazmb:PJ, reading this thread you have got me curious about improving my PC sound. But let me start with a quote from Hydrogen Audio Wiki about bit matching:

"Impact on audio quality
Quality gains are questionable at least. In most cases the differences are irrelevant unless the output is digitally captured back and needs to be bit-exact for further processing."

You'd be amazed at the subtle differences in sound quality people claim to hear. I would expect greater gains from bit perfect playback than, say, a upgraded power lead. Certainly, bit perfect playback won't be any worse. And as the tinkering is essentially free, why not do it?
Dazmb:
"Impact on latency
Bypassing Windows Mixer typically results in lower latency between decoding/rendering and output, though Windows Vista allows low latency playback through WASAPI shared mode without bypassing the mixer.

Note that low latency playback is relevant to real-time processing and editing only. It's completely useless for music playback; in fact, higher latency is better in this case as it gives better protection against glitching from buffer underruns"

I'm with you on this on. Latency is only important for music production.
Dazmb:
So why bother with ASIO or KS or WASAPI?

Why not? It's free.
Dazmb:
You are very pro Foobar - is it better than MediaMonkey? Computer Audiophile website reckon MM is the best.

Better in what way? I suspect that they all sound the same....and I don't believe I've made any claim to the contrary. foobar2000 does have a WASAPI plugin which, for me anyway, provides sound improvements. I have used MM (very briefly). It was alright. I just prefer foobar. Again, the user can play with all of them for free....so I'll let them decide which one suits them.

The reason I have started so many posts on foobar is because that's the one I use and have tinkered with. I write the thread to provide others the benefit of my experiences. I'd struggle to write something about MM cos I don't really know anything about it.
Dazmb:
I have a standard Creative Xi-Fi card which has it's own bit-match capability (but I don't use it as it only works with WAV's for some reason). It does have a SPDIF output, but i'm not using that at the moment as I'm going analogue straight into my AE Aego 2.1 amp. I guess have to get a DAC right? Are there any half decent cheapies

Yeah, I have Xi-Fi extreme gamer (i.e. cheap version). It's OK. I use optical out to my Beresford TC-7510 DAC. I reckon you could probably get one of these for < £70 off ebay.
 

PJPro

New member
Jan 21, 2008
274
0
0
Visit site
Just updated the original post to include a link to a site providing asio4all installation instructions for foobar and winamp. It also provides architectural information on Windows XP and Vista.

Find the site here
 
A

Anonymous

Guest
PJPro:Ok. I'm an IT professional. But I'm not an expert on Microsoft audio architectures. Nonetheless, I have done a little research into this and have produced this posting to provide some pointers for setting up Windows to optimise audio performance.

Windows XP

Windows XP provides a number of layers of software to process computer audio. This software architecture can/does impact the quality of the sound reaching the soundcard.

For example, Windows XP will support a number of concurrently running applications. Each of these applications may produce sounds. These sounds need to be merged together and sent to your soundcard for broadcasting. The software responsible for mixing of audio streams is the Kernal Mixer (or KMixer).

To simplify the job of mixing lots of sounds from different application, the KMixer resamples everything to 48kHz even if it is already at 48kHz (and doesn't make the best job of it). So your 44.1kHz audio stream from your media player is no longer bit perfect.

To get round this (and the latency introduced by all the operating system software) you need to enable your media player to connect directly to your sound card. To do this is you use Audio Stream Input/Output (ASIO) or Kernel Streaming.

To use either ASIO or Kernel streaming you need to have a plugin available for your media player of choice. These are available for Foobar2000 and WinAmp (ASIO, Kernel Streaming ). I am sure that many others exist (though see iTunes below).

Windows Vista

The audio software architecture is different in Vista. It has been completely rewritten to address some of the issues with Windows XP (see here). There is no Kernel Mixer in Vista.

The architecture provides an Application Programmers Interface (API) to support bit perfect streaming to the sound card. This is the Windows Audio Session API (WASAPI). It provides capability which is similar to kernel streaming but does not require the programmer to write complex kernel streaming code.

WASAPI supports two modes of use: shared and exclusive. In shared mode, audio streams are mixed and global effects (if specified) are applied before the stream hits your sound card. In exclusive mode the audio streams are not mixed and no effects are applied i.e. the audio stream from your media player is passed directly to the sound card.

To use WASAPI you will need a plugin for your media player and your sound card will need drivers to support it. Currently, I only know of Foobar2000 that has a WASAPI plugin. This operates in WASAPI exclusive mode only. The Creative Soundblaster XFi range supports WASAPI (but please check your specific model).

I have produced a How To thread detailing how to setup Foobar2000 to use WASAPI in Vista here.

See this thread if you want to use ASIO4ALL or find out a little more about the audio architecture in Windows (XP & Vista).

Mac OS X & Linux

Don't know a great deal about these but they do not seem to have as many of the mixer issues as Windows (perhaps supporting Ashley James's view that Apple desktops make a better audio source than PCs running Windows?).

iTunes

If you are running iTunes within Windows you are going to have the same issues as all other media players. Unfortunately, you are not able to work around the KMixer (in XP) or use WASAPI directly (Vista). If you desparately want to keep the iTunes frontend but want to improve sound quality you could check out this page. It details how you can set up iTunes to use Foobar2000 as a backend processor using the Multi-Plugin. I haven't tried this myself.

Sound Cards

It is worth noting that once you have set everything up to bypass the upsampling performed by windows that your sound also probably upsamples to 48kHz (check it's setting). If you can, set your sound card to 44.1kHz. If you can't, the upsampling performed by the card may be impacting sound quality. If you are using Foobar2000 you can add higher quality upsampling plugins to do the sample rate conversion rather than letting the sound card do the upsampling. I use this one. EDIT: Found out over the weekend that my X-Fi soundcard has an updated control console available allowing the selection of 44.1kHz, so I no longer need the upsampler

That's about all I know. Hope it is of use to someone.

PJPro,

Just reading through some of your posts and I wondered if you have any idea how Windows 7 has impacted computer audio? I saw a video on the web saying that the changes were "massive" but I didn't get around to watching it, and I've lost the link. When I installed Windows 7 my audio went crazy (bad noise not there on Vista) until I installed the Asus SoundMAX software but I've not got around to playing with this at all. Any words of wisdom? Do your comments on audio in Vista still apply to Windows 7 or is it a new ballgame?
 

PJPro

New member
Jan 21, 2008
274
0
0
Visit site
Sorry, no experience with W7 so I can't help. It's unlikely that I will be getting W7 in the forseeable future either.
 
A

Anonymous

Guest
I think the Audio architecture of Windows 7 is the same as Vista but with more emphasis/preference on/for Media Foundation codecs as opposed to Direct Show.

Both use WASPI as far as I am aware.
 

Alantiggger

Well-known member
Oct 14, 2007
274
33
18,920
Visit site
I'm guessing ...

3) Forum visitors are not interested in improving the quality of their computer based audio.

I am now using Foobar 2000 and litening to some of my cd's again... superb sound !

thx PJPro :)
 
A

Anonymous

Guest
'Sound Cards

It is worth noting that once you have set everything up to bypass the upsampling performed by windows that your sound also probably upsamples to 48kHz (check it's setting). If you can, set your sound card to 44.1kHz. If you can't, the upsampling performed by the card may be impacting sound quality. If you are using Foobar2000 you can add higher quality upsampling plugins to do the sample rate conversion rather than letting the sound card do the upsampling. I use this one. EDIT: Found out over the weekend that my X-Fi soundcard has an updated control console available allowing the selection of 44.1kHz, so I no longer need the upsampler'

PJPro: I have downloaded the sample rate converter plugin for Foobar2000 (foo_dsp_src9.dll), and put it in Components folder. How should I activate it and how shoud I set it (set to native 44100Hz or to maximum possible output sample rate?). Will my laptop finally output bit-perfect signal after this?
 

pwiles1968

New member
Mar 22, 2009
153
0
0
Visit site
Was curious about the iTunes Running on PC and have found the following which may be usefull if you are running Vista or W7 with itunes 9 (Or I assume 10), - http://www.computeraudiophile.com/content/iTunes-PC-bit-perfect-Windows-Media-Player-and-Vista-Media-Center-bit-perfect

Just in case it moves here is an extract

" Firstly, it does indeed appear that bit perfect playback is possible from the latest version of iTunes on the PC (Vista and above). Search the web for WASAPI and iTunes and you'll find numerous reports of digital receivers confirming that they are indeed receiving bit perfect signals. There's not really a catch either; the only thing to remember is that iTunes doesn't have exclusive access to your audio card so if you play another sound, the bit perfect audio stream is lost. So just listen to your music, sit back and enjoy. To do this: open up Quicktime -> Edit Preferences -> Quicktime preferences -> Audio tab -> select Windows Audio Session. Volume must be set to max. (Obviously you need to set the sample rate to the same as your audio card and music, in my case all 16bit 44khz stereo). "

Cant really hear a difference in the back room which is where I am running Tunes through PC to AV amp and speakers it sounds better than the average PC but it is not what I would call Hi End, The front room runs an Airport Express and I have read this is Bit Perfect already so I dont have any concerns there.
 

PJPro

New member
Jan 21, 2008
274
0
0
Visit site
Gok:'Sound Cards

It is worth noting that once you have set everything up to bypass the upsampling performed by windows that your sound also probably upsamples to 48kHz (check it's setting). If you can, set your sound card to 44.1kHz. If you can't, the upsampling performed by the card may be impacting sound quality. If you are using Foobar2000 you can add higher quality upsampling plugins to do the sample rate conversion rather than letting the sound card do the upsampling. I use this one. EDIT: Found out over the weekend that my X-Fi soundcard has an updated control console available allowing the selection of 44.1kHz, so I no longer need the upsampler'

PJPro: I have downloaded the sample rate converter plugin for Foobar2000 (foo_dsp_src9.dll), and put it in Components folder. How should I activate it and how shoud I set it (set to native 44100Hz or to maximum possible output sample rate?). Will my laptop finally output bit-perfect signal after this?

Using the upsampler plugin is a workaround to (hopefully) do the upsampling so that the soundcard doesn't have to. Therefore, you need to set the upsampler at 48kHz.

I don't use an upsampler plugin at the moment and haven't the time to experiment (sorry). But I would expect that you'll find something in the Output section of the preferences. To find the Output section, do the following:

File | Perferences - Preferences dialog opens
Expand Playback node in tree
Click Output node in tree

If there's nothing listed, try taking a look under Tools (same level as Playback in the Preferences tree).

Hope this helps. If it does, why not add to this post to help those who follow?
 
A

Anonymous

Guest
Haven't got the time to read this whole thread, but I've been exploring computer based music for a while now and find your posts really interesting and informative (though alot of it bedazzles my average intelligence).

You've spent a massive amount of time to patiently explain this complex subject to us mere mortals and its much appreciated, thanks very much.

I've experimented with XP and windows 7 a little but have decided to go Apple very soon. I'll try to contribute when things are clearer in my mind but for now, keep up the excellent and interesting threads.
 

datay

New member
Nov 19, 2008
28
0
0
Visit site
Just like to say thanks for this and couple of your other threads, I have now got itunes outputting through WASAPI and just downloaded foobar2000 with WASAPI plug-in, wouldn't have known otherwise and the guide for installing WASAPI was indispensible. Though I was using Winamp for FLACs with ASIO (on Windows Vista, and I'd only just learned about ASIO), was using iTunes for other general music downloads (music podcasts basically), this optimises my system. I have only just got foobar2000 but looks like that may become my only player (guessing it can be used with an ipod nano?)
 

TRENDING THREADS

Latest posts