Head-Fi.org › Forums › Equipment Forums › Computer Audio › What exactly does kmixer do?
New Posts  All Forums:Forum Nav:

What exactly does kmixer do?

post #1 of 17
Thread Starter 
This is from the microsoft website. From this kmixer seems quite innocuous: if you play a 44khz file, then kmixer will output to the sound card in 44khz. But on this forum it is said that kmixer resamples.


Kmixer mixes all Windows audio data, including data from applications that use the Win32 waveOut functions...

Kmixer is the only software on the system that can specify the format of the hardware's DMA buffer. It selects the format on the basis of sounds it is asked to mix. It sets the output format to the highest-quality format of sounds that it is asked to mix, or to the closest format to this that the hardware supports...

For your application, this means that the hardware format is based on the data you actually play. If you play a 44 kHz file, Kmixer will mix all data up to 44 kHz and ensure that the hardware is running at 44 kHz.
post #2 of 17
There are two distinct problems with kMixer. First, the text you cite is correct in saying that "Kmixer will mix all data...." Unfortunately, kMixer does just that -- it "mixes" all data even when it doesn't need to. The mixing algorithm as implemented by Microsoft has been shown in many cases to only have a signal to noise ratio of about 92dB. The problem is that CDs have 96dB (or 97.5dB for the hardcore signal processing guys) of dynamic range. Effectively, kMixer overwrites the last couple of bits of the signal with garbage, reducing CD data from 16 bit data to effectively 14 bit data. There are some people who claim that this can't possibly make an audible difference, but most people who have read the psychoacoustic literature or done real-world testing argue that this does make a difference. You're probably thinking: why does kMixer need to do anything to the signal if it's just taking 44.1kHz data and outputting 44.1kHz data? Well, strictly speaking, it doesn't, but kMixer is not implemented in the most obvious way.

The second issue is hardware (and sometimes poorly-written drivers) that interact with kMixer to cause 44.1kHz data to be resampled to 48kHz. All AC97 compliant hardware must be able to handle 48kHz sound, so that is always a given, but supporting 44.1kHz sound natively is optional. It also requires additional physical hardware: either a separate hardware clock or a PLL. Thus, the physical design of some cards forces kMixer to resample all data to 48kHz. The Xitel Hi-Fi Link is one example of such a device. More interesting are cards that can support 44.1kHz, but the drivers are poorly written so that they hand off data to be resampled to 48kHz by kMixer anyway. You'd be surprised just how many cards have drivers that do this. The Sonica 1.2.20 drivers on Windows XP are one example (interestingly, this does not happen on Win2000, or on either OS with the 1.2.05 drivers).

I know this sounds squirrely -- many people doubt that kMixer munges their data. The best way to check for yourself is to connect your sound card to a home theatre receiver that can decode Dolby Digital or DTS, and play back some 44.1kHz DTS/DD PCM-encoded files. If the card passes the data without resampling to 48kHz or munging the last couple of bits, you'll hear music. If something goes wrong, you'll just hear loud static. Many people who do this experiment are surprised by the results. I know I was. On many of my hardware configurations I was unable to avoid resampling, no matter what drivers or playback settings I used (Kernel Streaming in particular is no magic bullet). On the other hand, this test also lets you know when you've got a good system setup going on.
post #3 of 17
Thread Starter 
Thanks for the detailed reply. Losing one to two bits of data is strange. The only reason I can think of for this is that the volume of the output is reduced to avoid clipping when more streams are added. If volume is reduced by a factor of 2-4 this would have the effect of losing one or two bits. In that case bypassing kmixer should increase volume: is my theory right?
That's a good test you propose. I don't have the equipment so I'll have to try digital out-digital in to test.
Presumably if sound card output is 24 bit then you will get effectively 16 bit output, and kmixer won't do much harm?
post #4 of 17
I have read all the threads about getting my sonica to be bit-perfect on win XP. I tried using the 1.2.05 driver from m-audio and also the 1.2.00 and the most current driver. I hooked the sonica up to my panny xr45 HT receiver via optical. I have tried foobar with asio, kernal streaming, wave out and direct sound. No matter what combo I try, i can not get anyting but static when I play a DTS or DD wav file from the suggested sites. I also get errors when I try some of these plugins. Do you simply drop the dll file in the component folder of foobar and choose it in the output tab? What player/plugin do you use to get bit-perfect? Am I doing something wrong with the plugins?
post #5 of 17
Concentrate on getting the 1.2.05 drivers to work. Disable all the options in the M-Audio Sonica control panel. Raise the system volume slider to max. Go into Foobar and remove all DSPs, including volume. Set the output to 16-bit fixed point. Disable ReplayGain. Use kernel streaming. Let us know if you're still getting static after trying these things.
post #6 of 17
Wodgy, thank you very much! I got it to work. I was really confused at first. I had changed all the settings to what you said (I think that was part of my original problem). But then it kept on giving my weird output errors, I was really, really confused at this point. Foobar was like not registering changes I made in the prefs. For example, I would switch to KS and save settings and try playing a wav and it would give me an asio error? Anyway I removed the asio dll from the foobar component folder and tried again. Now after choosing ks, it would give an error querrying device (sonica) abilities. I'm not really sure in the end what i did to make it work. I switched to wave out and it miraculously played a DTS wav file. Switched to direct sound, and it also worked, switched to ks and it worked also. Wonder if it is not saving my settings and reverting to ks?

Again thank you so much. i would have never have figured this out on my own. I'm still not sure I know what I'm doing, but it's working!
post #7 of 17
http://www.hydrogenaudio.org/forums/...showtopic=4569

The fb2k lead dev doesn't seem overly concerned about the effects of kmixer/dsound over ASIO/KS output - thus neither am I.
post #8 of 17
Peter (author of Foobar) has changed his mind somewhat on this issue. At first, he claimed there's no possible way anyone could hear the distortion, and that it was largely a theoretical issue. Since then, people have developed samples (particularly Udial.wav) where the distortion is clearly audible to untrained ears, and because of this the whole zeitgeist at Hydrogenaudio is slowly shifting.

Some still say, yeah well, it really doesn't matter. My answer is this: if you're satisfied with 14-bit audio (essentially what kMixer gives you), by all means, don't let it bother you. But do ask yourself, if 14-bit is "good enough", why not 12-bit audio? Why not 10-bit audio? How do we know when "good enough" becomes "not good enough"? Hell, why not just be content with 8-bit audio? Because 8-bit audio sucks, that's why. Try it sometime. 14-bit audio is not quite as bad as 8-bit audio, obviously, but most of us are striving to create a computer audio setup that sounds as good as a standalone CD player. This means clean, accurate 16-bit audio. Anything else is not good enough.
post #9 of 17
I have the opposite of golden ears; I would never be able to tell You're right though, the cumulative effect of errors shouldn't be ignored and when it is easily rectified there is no reason not to bypass kmixer.
post #10 of 17
What about playing at '24bit padded to 32bit'? If KMixer fiddles only with the upper bits, then with that mode there should be no difference. The DAC treats the leftover 8bits as 0's in anycase.
post #11 of 17
That's not a bad idea. Probably worth trying on some hardware configurations.
post #12 of 17
Btw, next version of RMAA will feature ASIO support for some easy comparisons between KMixer and no-Kmixer.
post #13 of 17
There is an obvious difference for me between bit-perfect and whatever kmixer does, in favor of bit-perfect. That being said, some people have different goals and different equipment. My panny dvd xp-30 still puts out a much noticeably better digital signal than the sonica.
post #14 of 17
on my system, running udial doesn't produce any distortion and I am running it Direct Sound (in other words, through Kmixer)

EDIT: Also, in a/b blind tests I didn't notice a difference between direct sound / kernal streaming.
post #15 of 17
Udial works fine with my card with KMixer. I think the udial sample produces artifacts only with resampling (44.1KHz -> 48KHz) which is needed for many consumer cards.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Computer Audio
Head-Fi.org › Forums › Equipment Forums › Computer Audio › What exactly does kmixer do?