HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: KikeG on 2003-01-16 08:40:27

Title: My tests over kmixer effects
Post by: KikeG on 2003-01-16 08:40:27
I've been doing some tests over kmixer effect, both using standard waveout and directsound, connecting my TBSC digital output to my Audiophile digital input, under WinXP (no SP1), and I'm sure that with a single stream at 48 KHz, with the TBSC mixer volume at max, the kmixer doesn't touch a bit of the audio stream, it's sent bit-perfectly to the output of the card. At 44.1 KHz I can't be so conclusive, since the TBSC resamples everything to 48 KHz and I've had some problems to test it the same way, but according to my analog measurements in loopback mode of Audiophile output, there is no trace of signal degradation over the 44.1 KHz played data.

...So it's very possible that this kmixer sounding worse than ASIO or k.streaming is our old friend mr. placebo entering into scene again.

Anyway, I'll do some more tests in the future.
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-16 19:02:04
Could you describe this setup in a bit more detail. How did you generate the 48Khz WAV file how did you record it digitally and how did you compare.

Try this with a 44.1Khz wav file on your M-Audio card and let us know what you find. So, far no one has found a way to get the exact bits you stuff into Directsound or waveOut come out at the other end unmodified.

If you somehow found a way around that problem, that would be great. Please describe in detail how you do it. Good sample files are the DTS encoded material from swedish broadcasting run into a DTS receiver over digital out. If the receiver can decode the DTS signal at the right speed you are there!

This helps a lot with the placebo question. Stereo hiss is very different from a correctly decoded DTS signal.

Cheers

  Thomas
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-17 08:46:54
I used WinXP pre-SP1. As I said, at 48 KHz,  I used the digital output of the TBSC connected to the digital input of the M-Audio Audiophile 2496. I set the volume of the TBSC wave slider in the mixer at max. I played several signals I generated with CoolEdit Pro 1.2a in 16 bit mode. First, a 1 KHz at -1dB and another at -60 dB dithered sine that showed no digital or analog distortion artifacts, or amplitude changes when recorded. And second, and more important, a series of single pulses with known amplitude (data values) , that showed exactly same data values after recorded. For a more thorough test, I will record a musical singal and the proceed to compare bit-by bit the signal, using EAC wave comparator, but I don't think there will be any difference. The result was the same with waveout or directsound.

Note that if the output of the mixer wave slider of the TBSC is not at max, all I've said doesn't hold. Digital distortion artifacts appear and the recorded data is no longer equal to the played data.

As I said, with 44.1 KHz I couldn't use a digital comparison, since the card resamples everything to 48 KHz and when I did the test, due to some operating limitations with my Win98SE, I couldn't have a reference of the output of a hardware resampled 44.1 KHz wave file without kmixer effect, to compare. Now I have, so I will try so make a similar test with 44.1 KHz data.

Alternatively, I used analog output and input of the Audiophile, connected to each other (loopback configuration). The recording was done in 24 bit mode, with AP mixer disabled, and I played several test signals both in Win98SE (without kmixer effect) and in WinXP (with kmixer effect), and all the analog measurements I did with several 16 bit dithered signals generated with CEP (dynamic range, frequency response, distortion) were the same the same, I didn't appreciate any differences. I this case of 44.1 KHz I'm almost sure that the data is not altered, but since I can't make a digital copy, I can't prove it 100%. But even if the kmixer does something, it doesn't reflect into high precision analog quality measurements so I can conclude that, at least, it won't be audible.

I don't have any DTS decoder available to check if there's a problem here, but as I said, I'll make some more tests and try to get more conclusive results when I have time.

Now, could you describe how did you do your tests? Maybe you card internal mixer was the one that was altering the data played?
Title: My tests over kmixer effects
Post by: kaiwei on 2003-01-17 10:52:39
Did anyone actually claimed that it sounds better? I thought what we're going for here is accuracy, as in what goes in MUST come out the same instead of something else NOT intended.
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-17 11:06:50
I don't think anybody has claimed it sounds better, more the opposite.
Title: My tests over kmixer effects
Post by: dev0 on 2003-01-17 15:17:33
So basically all of thomaspf claims turn out to be false?
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-17 16:17:34
Very interesting. All the experiments I did came after I upgraded my PC to XP from Win98 and something was wrong. I have my collection of music on HD in Monkey audio format and after the upgrade I could ABX the digital out of my computer from my CD player which just did not make sense.

Many people pointed me towards jitter which is so small an effect on my system that it did not make sense either, so I ended up looking at the bits. I send and recorded the 16bit 44.1Khz streams in loopback mode on the M-audio and XP/SP1 and the streams are indeed different when doing a bit compare.

I have never tried 48Khz before.

Sending the DTS or HDCD encoded 16bit/44.1Khz files is a reliable method to see whether you have this problem without extensive ABXing and the problem has manifested itself for many others as well. I'd be interested to hear what you find if you do your loopback test on the M-audio with a digital loopback and a 16bit/44.1Khz file.

I will do a little more testing on 48Khz files in 16 and 24bits as well.

Cheers

    Thomas
Title: My tests over kmixer effects
Post by: Pio2001 on 2003-01-17 17:43:35
Loopbacking a soundcard into itself can lead to problems.

1- The clock is left as "master", and the input is bit exact -> depending on the latency between the output creating the bits, and the input reading them, there can be skipping.

2- The clock is set to "digital input" -> anything can occur... the clock is completely disabled, the input is used to clock the output... that is the other end of the input cable ! It's a kind of Larsen effect, but in the time domain instead of the intensity one...

3- There is no clock setting, and/or the soundcard resamples -> The recording is OK, but the bits are different from the original.
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-17 18:21:26
Interesting. I thought input and output of this card can actually work asynchronously. So if you make the sending port master the input port will derive the clock via the input stream. However, I haver never tried to send a 44.1Khz stream and record 48Khz at the same time.

In any case, some people repeated this with end-to-end tests and found the same problem. Also the problem with HDCD/DTS signatures on 16bit/44.1Khz files goes between the sound card and an external receiver. These problems all go away if using ASIO, including the capability of using digital loopback to record exactly the bits you send.

My receiver/DAC is currently in the factory for upgrades so I have not played with the kernel streaming plugin.

Cheers

    Thomas
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-18 16:59:40
thomaspf, there's one thing I don't understand... with my M-Audio Audiophile it is impossible to loopback the digital in and out, because, as Pio says, with this card, in order to record a spdif signal the clock must be set to external in order to lock the card with the incoming spdif data, so the internal clock is disabled, and if the external clock is disabled no clock can be sent to the digital output. (?)
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-19 05:11:17
Strange. I have an M-audio DIO24/96 and I have no problem doing this. I set the master clock to internal xtal and can record the digital output via loopback just fine. I have not connected anything to the monitor mixer. Is the Audiophile different from the DIO in this respect?

It turns out that input and output are not asynchronous but I can record only when I play and record at the same frequency. I am a bit lost how skipping can occur here. This locking seems to get one sample read for one sample written. The internal API delays might affect when a sample actually hits the wire after calling the API but as long as you don't have underruns on the send side you will end up sending the complete consecutive stream. All these bits will get recorded in the same order with the same values with a varying amount of leading and trailing samples of zeros.

I just completed a whole set of recordings. I used ntrack for recording the S/PDIF input and played the tracks with different output methods using Winamp (wave,DS, ASIO), foobar2000 (wave, DS, KS) on the same machine, and my external CD player.


I wrote a little command line tool for finding offset in the recorded files and doing the comparison but I can't find that anymore, so I did an early check using the statistics function in cooledit2000. So far, I get the same picture that I got 8 month ago. The values in this statistic that are invariant to leading and trailing samples of zeros in the recorded files have exactly the same values for the EAC ripped wav file, the recording from the external player, and the loopback recording played via ASIO.

All the other recordings fail easy checks like min and max values for the samples including the recording using foobar with KS output.

I have to work tomorrow, so I will probably have to continue this next week.
@KikeG how did you do the bit compare between the recordings and your original file. Do you have some tool that finds the correct offset in the recording and does a sample for sample compare?

Cheers

  Thomas
Title: My tests over kmixer effects
Post by: Pio2001 on 2003-01-19 13:51:06
Actually, long ago, I managed the same loopback with the Marian Marc 2. But I don't remember how. I don't know if the clock was on master or slave, and if I used coax or optical. I tried more recently, and couldn't find how I did the first time. I think only one of the four combinations (coax/opt + internal/external) must work.

When recording from the DAT analog input through the digital input of the card, I often run into a clock loopback because the DAT being my D to A converter, it is always in slave mode, and I often turn the souncard to slave first when I have to record. At this time, both are slaved to each other. On the DAT, there is a display showing the synching on the external source. In this configuration, it blinks crazily, like a broken fluorescent lamp.

One question : what is an ASIO driver ? You seem to imply that we have the choice between an ASIO driver and a non-ASIO one. I don't see this in the Marian Marc 2 (supporting ASIO 2.0). I wonder if it's not an "ASIO-only" card.
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-19 17:03:53
Windows has supported a various driver models over the different versions. Most of these were introduced by Microsoft but the professional music market has developed it's own standards.


Microsft has MME, Waveout/in, Direct Sound

Steinberg has ASIO
Tascam has gsif

The M-audio cards have a multi headed driver that let's you run applications written to either standard talking to the card. I used the term ASIO driver loosely to mean the code that transfers PCM samples from a player application to the ASIO driver implemented for a card. Besides some professional programs someone in Japan wrote a Winamp output plugin for ASIO, which is what I used for this test. Since the Marian card supports ASIO that should work for that card as well.

http://www.aikis.or.jp/~otachan/out_asio.html (http://www.aikis.or.jp/~otachan/out_asio.html)

is the link to the latest. Besides Winamp I have used ntrack with ASIO and it has support built in. I use coax for the loopback and master clock is set to internal crystal.

Cheers

    Thomas
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-20 07:42:40
A few more results. First I recreated this little tool to check whether I can find a series of samples in another file. I then applied this to find the ripped original in all the recordings.

In the first round I found a bit exact copy of the original file only in the ASIO file but the recording from the external CD player had skips in it. So, I went back and it turns out that I recorded this file with the master clock still set to internal. I changed that to S/PDIF in and 44.1Khz and the new recording now also contains the correct bits as expected.

I then repeated my recording experiment with the same track resampled to 48Khz by ssrc and again the version recorded when playing via the ASIO plugin is correct. I only checked waveout in this case but again the bits are not identical to the original. This is all in loopback since I can't use a second computer to do an end-to-end and the external CD player only emits 44.1Khz.

Where does this leave us? While I can't make end-to-end tests with 2 computers like KikeG I still can't seem to reproduce his results of bit perfect playback.

Can anyone else on this board use WAV or direct sound playback in Winamp or Foobar to play the DTS/DD encoded files from the swedish radio to your receiver and get the receiver to lock? Can you do this when you switch to the ASIO output plugin in Winamp. In any case you must have full volume and all effects disabled.

@kikeG
Do you have any recommendation to what I could try different?

Cheers

    Thomas
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-20 12:00:43
I have only one computer too, but two soundcards in it. I've doing some more tests this weekend.

I've not been able to loopback the digital in and out of the Audiophile, no matter what I try, using latest drivers for both XP and Win98. Your card uses same drivers, but if you are able to record digitally I guess the hardware must be a little different. If using ASIO/KS you get bit-perfect results, that proves it works in your case. (don't try ks of foobar because this prog. already changes the data due to additional internal processing)

In order to check bit-perfect reproduction, I connected the digital output of my TBSC to the digital in of  the Audiophile, but this works well only for 48 KHz data, since the TBSC resamples 44.1 KHz.

After doing more tests using this system, I've concluded that, at 48 KHz, the data played is bit perfect. I've checked this recording 20 sec. of music, manually adjusting the starting offset of it, and then mixing with it an inverted copy of the original data, in CEP. The result is all zeroes, that means that the data was exactly the same. This works no matter you use waveout or directsound.

With 44.1 KHz data I've found some differences. It's impossible to use same method because the TBSC internal resampling changes slightly the data depending on what OS and software are you using. In this case, I've relied on traditional signal quality measurements (SNR, dynamic range, frequency response, low level distortion and graphical analysis of the noise spectrum) both using the digital output and the analog output of the TBSC, obtaining same results in both cases. In case of analog output, analog recording was done with the Audiophile in 24 bit mode to obtain greater precision.

I've found that, in case of the TBSC at 44.1 KHz , waveout output uses kmixer resampling whereas directsound and kernel streaming use internal hardware resampling. Kmixer resampling is easily detectable, and offers slightly better high-frequency response (hardly audible), but a noticeably worse SNR due to increased digital distortion (audible? could be, for good systems/ears/music). Disabling directsound acceleration of the card (also called hardware mixing, etc), kmixer gets in too, getting same as with waveout. So, ks and hardware-compatible directsound output offer indistinguishable quality according to these measurements, but waveout distorts a little bit more the signal.

However, dropping the TBSC and looping back just the Audiophile analog in and out the results are the same no matter what I use:waveout, directsound or kernel streaming, or W98 waveout. No difference according to these analog measurements, so I can guess that kmixer does never kick in, in this case. I didn't try ASIO, but I assume there will be no difference.

So, my conclusion: kmixer changes the data depending on your card, drivers and output method. Directsound is not supposed to change the data, at least if your card offers directsound hardware support (hardware mixing or acceleration), but kernel streming is more secure. With good semi-pro cards I guess kmixer won't change the data in any case, but I've only checked this for my card.

Note: all this holds with the mixer wave slider at max. in the case of the TBSC, and with the Audiophile patchbay/router set to hardware output connected to wave output (no monitor mixer selected at the hardware output, please). Otherwise the output data may change due to re-scaling of the data.

I've seen that kmixer acts when simultaneous different sampling rate signals are sent to a non-resampling card (Audiophile in my case) or when the sampling rate/bitdepth is not supported from the card. I've seen also that the resampling quality slider in the audio devices control panel applet only ahs effect when kmixer resampling happens with directsound signals. With waveout signals, kmixer resampling quality is always the max. possible. All this happens as said by Microsoft.

Another note: SSRC resampling is better that TBSC (and any other AC'97 card) resampling, and "more" better than kmixer resampling, so this is another viable option.

Hope this clears up (if possible (?) ) the issue.
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-20 12:03:06
So, all software that uses waveout (WinABX, abc/hr, PCABX, others) won't  play max. quality signal with TBSC cards and I guess that with other AC97 cards too.
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-20 13:50:58
thomaspf, make sure that in the settings of the patchbay/router of your card the hardware spdif out is connected to the wave spdif out, not to the monitor mixer.

Also, about ABXing your card against a cd player, in order to have a meaningful comparison, first you have to match the ouput levels of the devices at test with a max. difference of 0.1 dB, using for example a 1 KHz tone.

What driver version do you use?
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-20 17:32:57
Looks like we are getting on the same page here!

I have no connections to the monitor mixer.

Matching the levels comes for free in my case since I am just passing the digital stream out to my DAC and my whole investigation started by my assumption that given the same bits that should sound the same.

I have made all these experiments initially on the 5.10.00.27 drivers. Since I also use that PC for watching DVDs I am now using the 5.10.00.31 wave cyclic driver which does not have the problem of corrupting the time stamps leading to audio/video sync problems. The results are the same.

The real news to me is that you can use directsound with hardware mixing and get bit perfect playback. This makes a lot of sense sense since that should also bypass kmixer. Unfortunately when I use the DS output plugin v2.2.6 and select force harware mixing it does not work but pops up an error dialog stating that it can't create a direct sound buffer. What are your settings to make this work on the M-audio card.

Cheers

    Thomas
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-21 09:15:48
In my Winamp 2 directsound plugin, I have no options to force directsound acceleration, I just leave it as is. I can disable direcsound acceleration only in foobar.

With my Audiophile, the results are the same no matter if I use the .26 or the .27 drivers, or waveout or directsound. The analog output signal is of the same quality than in Win98 or ASIO in my case, but I can't be sure that no bits have been changed.

I'ts a pity I dont have any DTS decoder or anything to receive a spdif signal in order to check what's happening.
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-21 20:58:47
My DAC/surround sound proc is on it's way back from the factory. I will do some final eval with DD/DTS encoded files next weekend.

Cheers


    Thomas
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-24 16:14:01
Ok, I've managed to get decent drivers for my motherboard-embedded CMI8738 card. I've installed M-Audio Delta DIO2448 WDM drivers, which use same hardware, and I can say that, in case of a single stream, and setting the wave mixer slider at max., the digital output is bit-perfect, no matter if the stream is 44.1 KHz, 48 KHz, directsound or waveout. It is pretty clear that in this case kmixer doesn't alter the signal at all.

About Audiophile 2496, DIO2496 and similars, considering that I couldn't detect degradation on the analog output of mine, and since the driver I've used for my CMI8738 card is also from M-Audio, I think it is pretty probable that the output of the former card is also bit-perfect in my case.

Still, there can be problems with resampling cards, such as the ones I verified with my Turtle Beach Santa Cruz.

Edit : OS is WinXP (no SP1)
Title: My tests over kmixer effects
Post by: Continuum on 2003-01-24 16:41:43
Quote
Ok, I've managed to get decent drivers for my motherboard-embedded CMI8738 card. I've installed M-Audio Delta DIO2448 WDM drivers, which use same hardware, and I can say that, in case of a single stream, and setting the wave mixer slider at max., the digital output is bit-perfect, no matter if the stream is 44.1 KHz, 48 KHz, directsound or waveout. It is pretty clear that in this case kmixer doesn't alter the signal at all.

I have the same onBoard sound. Does this produce bit-perfect results only with these special drivers?

I tried a digital loop-back some time ago, which didn't yield perfect results, but as was mentioned somewhere, loop-back is not a fair test because of the clocking.

As the analog quality is terrible, I've hardly used it, but if the digital output is ok, I'd gain a digital coax in/out (not that I need one...  ).
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-24 23:31:17
@kikeG

I am expecting to get my DAC back this weekend and want to close this out. I would like to recreate your environment and it would be great if you could share more detail about the software you are using for your tests. I still have not been able to recreate your successes.

What player are you using?
What plugins at what version with what setting are you using to get bit perfect playback?
What drivers are you using?

I will try to recreate and post my results over the weekend.

Thomas
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-26 13:38:36
Quote
I have the same onBoard sound. Does this produce bit-perfect results only with these special drivers?

With generic drivers, it was impossible because they always scaled the data, no scaling was impossible.
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-26 13:41:37
Player: Winamp 2.81

Drivers: latest M-Audio Dio2448

Recording with Audiophile 2496 spdif in.
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-29 07:46:14
I finally got my DAC back and repeated my tests via playback of encoded DTS 44.1Khz DTS wav files. I installed the latest Winamp 2.81 and again tried the Waveout, Direct Sound and ASIO output plugins. This is now a true end to end test which removes the potential of introducing problems via the loopback.

Again the result is that only the use of the ASIO plugin let me play these wav files unmodified so my processor can figure out the DTS encoding.

I tried to set force hardware mixing in the Direct Sound output plugin and get the same error message about not being able to create a buffer.

I am using the M-audio DIO24/96 with the consumer driver 5.10.0.5031 dated 10/15/2002 on XP-SP1. This is a non resampling card and it seems there is still some bit mangling going on in kmixer.

Has anyone else on this forum been able to play 44.1 Khz wav files with DTS encoding using Waveout or DirectSound on Windows XP. What card are you using? 

(I know this is possible with the USB connected M-audio Sonica and the RME Digi 24/96 since they both bypass kmixer).

Cheers

  Thomas
Title: My tests over kmixer effects
Post by: Continuum on 2003-01-29 10:53:51
Are you sure that all volume levels are set to maximum? I noticed that the ASIO plugin ignores the volume setting in Winamp while the other plugins don't.
Title: My tests over kmixer effects
Post by: KikeG on 2003-01-29 13:38:37
Yes, that could happen, but depends also on the settings of the card control panel.

thomaspf, make sure that you M-Audio card control panel is properly set when playing the files: internal clock, 44.1 KHz freq., Hw. Out spdif to Wave out sdpif out, and try the different digital output format and data type settings just in case. Disable volume control at Winamp (just in case, in mine doesn't work). Make sure you are not using a SSRC output plugin, DSP plugin or the like.
Title: My tests over kmixer effects
Post by: thomaspf on 2003-01-29 18:07:28
I set everything up as it shoud and also consulted with one of the distributors of the M-audio cards in the US to no avail.

If kmixer is in the middle there is no bit transparent playback with these cards on Windows XP. ASIO and supposedly Kernel streaming are the two solutions that work. In fact, I got more communication from users of other cards seeing the same problem. AC97 cards are out of luck to begin with but even a Lynx Studio 2 has the same behavior. At his point people should really try this out and refrain from pointing to volume control, effects processsing etc.

So, I am really interested what other cards if any people have been using to make this work correctly on Windows XP.

Cheers

    Thomas
Title: My tests over kmixer effects
Post by: thomaspf on 2003-02-02 23:09:05
Here is another tidbit. I had a conversation with a user who uses a C-Media 8738 sound card with the M-audio DIO 24/48 driver.  Coincidentally he has a surround sound receiver , so he performed the quick test of playing DD/DTS encoded files to check for the kmixer problem.

He gets exactly the same behavior as I see on my M-audio DIO24/96 and for that matter anyone else using native WDM audio drivers on WinXP that I have heard of. Waveout and DirectSound modify the bit stream in a way that the surround receiver can't detect the surround streams any more.

This leaves the M-audio Sonica and the RME Digi 24/96 as the only cards I have heard about that work on W2K/XP to playback unmodified bits with Waveout or DirectSound.

Sorry, to burst the bubble but it seems it's time to change the headline on this thread.

My tests over kmixer effects
    Seem to be real .....


Thanks for all the help to get at the bottom of this

    Thomas
Title: My tests over kmixer effects
Post by: KikeG on 2003-02-03 08:25:59
This is strange, I hope I had a DTS decoder to make some tests. However I'm 100% sure that in case of my CMI8738 with DIO 2448 drivers, the spdif output is bit-perfect, there are no changed bits at all.
Title: My tests over kmixer effects
Post by: Pio2001 on 2003-02-09 06:26:55
I get bit perfect digital playback-record in loopback, but with WaveOut only, not with DirectSound.

Windows XP
Winamp 2.81
Marian Marc 2 (http://www.marian.de/english/main.htm) digital out soundcard

32 kHz wave file
DirectSound output : the outside DAC gets 44.1 kHz streaming instead of 32 kHz !
WaveOut : the outside DAC gets 32 kHz streaming.

44.1 kHz wavefile. Optical out looped back into optical in. Digital out source is "application program".  Clock is slaved to the digital in (otherwise I get "an unknown error occured trying to open the device" when I want to begin recording).
SoundForge 4.5, recording device = Marc 2 digital in.
The recorded wav is identical to the original.
Title: My tests over kmixer effects
Post by: KikeG on 2003-02-09 19:16:36
I think the relevant results here would be for 44.1 and 48 KHz KHz data. So, for those, does it work ok both with waveout and directsound, or just with directsound?
Title: My tests over kmixer effects
Post by: thomaspf on 2003-02-09 20:10:14
I just checked the Marian WEB site. It looks like the drivers for the Marian are similar to what RME is doing for the DIGI 24/96. Their windows XP drivers are not native WDM audio drivers but Win9x/NT style MME drivers with some additional glue (power mgmt, PNP) to make it run under W2K and XP. One of the open issues for them is to support native WDM applications.

Can you try kernel streaming?

The Marian card has a control panel that let's you lock in the format when using Diretcsound. Have you set this correctly for 44.1Khz and 48Khz.

The next OS release is supposed to address the problems with WDM audio / kmixer interaction. For the time being if yoo have a card with native WDM audio drivers you are out of luck.

Cheers

    Thomas
Title: My tests over kmixer effects
Post by: KikeG on 2003-03-06 15:35:33
OK, I've performed several RMAA (RightMark Audio Analyzer) measurements over all these things. They show how analog performance with directsound and waveout are virtually identical to ASIO output, both in 16 and 24 bit output mode, for my Audiophile card.

I've also compared analog output with and without kmixer resampling kicking in, and a digital measurement of kmixer resampling.

All them are accesible at http://www.kikeg.arrakis.es/measurements (http://www.kikeg.arrakis.es/measurements)
Title: My tests over kmixer effects
Post by: KikeG on 2003-06-30 13:03:26
Well, a couple of months ago I managed to get mi CMI8738 based card digital input to work.

Using it, and bit-perfect recording the digital output of my Audiophile card at 44.1 KHz mode, I've been able to verify that kmixer indeed does something to the data passed to it. The change is very subtle, so it was not detectable on my analog measurements of the soundcard output. What I've verified that kmixer does to 16-bit audio data, is just mangle the last bit of the data. It does like some kind of re-dithering of the signal, adding a very little amount of spectrally uniform noise to the signal, so that it is no longer bit-perfect. It also adds a very little amount (around -120 dB amplitude) of distortion that can be considered negligible.

I have measured this noise but I don't have the results at hand right now, but with this noise added, the dynamic range of the 16-bit signal is still better than 90 dB.

I haven't been able to do same tests with 24-bit audio, because I can't get a 24-bit recorded data, but I think this is a problem of my testing configuration, because on analog measurements, the analog output of the card with kmixer processing was able to produce an analog signal with better dynamic range than the possible with 16-bit audio. I'm trying to fix this.

When using kernel streaming and ASIO, the output is bit-perfect in 16-bit mode, as it was supposed. There's some evidence that using directsound acceleration (also called hardware mixing) does same thing as using kernel streaming, and enables getting bit-perfect output. However, I haven't been able to verify this, since my Audiophile card doesn't support it.

Note that when kmixer is acting and you play 44.1 KHz data, it can do do two different things depending on the driver implementation. The first is just this relatively bening bit mangling I've talked about in this post. But on some cards and modes (wave output instead of directsound, for example), it will resample the signal to 48 KHz, and this is a greater change to the signal. I haven't done very detailed tests over this resampling, but it worsens a little bit more the SNR of the signal, causes some low-level distortion and causes a very slight HF rollof. At first I don't think this is audible under usual listening conditions, but I haven't done any listening tests.

Note also that there are some professional-oriented cards that use special WDM drivers that don't suffer from any of those kmixer issues. These drivers don't fully conform to the WDM standard, and can't use kernel streaming, but, on the other side, they don't need it. RME cards for example, use this kind of non-standard, kmixer-free, WDM drivers.
Title: My tests over kmixer effects
Post by: KikeG on 2003-08-01 17:55:52
Well, I just did a few more tests. I own now both a Revo and an Audiophile, so I can play all types of data on the digital output of the Revo and record them with the digital input of the Audiophile. I just did some RMAA 4.3 measurements, that uses WDM (directsound) drivers, and here are the results:

I will give results without A weighting, I like it better.

1st figure is reference, best possible value. 2nd is kmixer bit-mangled output.

Frequency response is totally flat in all cases, so is omitted.

16 bit, 44.1 KHz:
============
Noise: -96.4 dB, -93.4 dB
Dynamic range: 94 dB, 90.9 dB
THD: 0.000%, 0.001%
THD+N: 0.003%, 0.004%
IMD+Noise: 0.006%, 0.008%
Crosstalk @1KHz: -94 dB, -90 dB

The distortion product that appears at the THD measurement is at -110 dB, not -120 as I said previously. It is still a negligible value in my opinion. The biggest difference is the slight increase of the noise floor. As you see, even here the difference is quite small.

24 bit, 44.1 KHz:
============
Noise: -146.3 dB, -141.5 dB
Dynamic range: 139.5 dB, 137.3 dB
THD: 0.000%, 0.000%
THD+N: 0.000%, 0.000%
IMD+Noise: 0.000%, 0.000%
Crosstalk @1KHz: -141.8dB, -137.2 dB

For 32-bit audio, results are slightly better but very similar.

Taking into account that due to real-world constraints of electronics the best hardware available can't have a dynamic range better than around 120 dB, the effect of kmixer bit-mangling in this case is totally negligible.

And, if you play your 16-bit data as 24 bit or 32 bit, the result is that in practice the full 16-bit resolution is retained, even if you don't use kernel streaming, because the bit-mangling effects are much below 16-bit resolution. In a RMAA measurement, the results in this case were identical to the 16-bit reference results. But this will be true just if your card is a true 24-bit card.

Even when the differences are small or very small and quite possibly inaudible even in the the worst case, this bit-mangling will prevent from bit-perfect digital transfers in any case.

Again, note that this measurements are about this kmixer bit-mangling, which I don't think is any kind of resampling. Measurements of real kmixer resampling (that happens at my card when for example both a stream at 48 KHz and 44.1 KHz are played at same time, or when the output is locked at 48 KHz and you play a 44.1 KHz stream), and its effects are much more evident, see link at a previous post. Resampling produces a worse THD & IMD, easy to see at the THD spectrum, and a slight but measurable difference in frequency response. The effects measured here are just due to some kind of partial "re-dithering" of the signal, probably performed at some stage of kmixer software mixing. But it's not resampling.

As I said at a previous post, on some cards (not Revo) resampling will happen whenever you play a 44.1 KHz stream, or when you use waveout instead of directsound... it depends on the card and its drivers, but in better cards this resampling happens just when it's unavoidable (simultaneous playback of both a 48 and 44.1 stream, or lock of the sampling rate at 48 KHz).

So, the bit-mangling measured here, always, always happens when you play 44.1 KHz data on WinXP (and same seems to happen with Win2K), which is something that AFAIK Microsoft doesn't say. It can be avoided just if you use kernel streaming or ASIO audio interfaces, or your card supports hardware mixing (same as directsound acceleration) and it is enabled.

Note that Creative cards support hardware mixing and kernel streaming, but they internally resample all 44.1 KHz data, so in practice the result is probably even worse that if they use kmixer resampling.
Title: My tests over kmixer effects
Post by: balazer on 2003-08-19 10:02:39
I understand that you need to use something like ASIO or kernel streaming to get bit-perfect digital output.  But what does it take to get bit-perfect recording from a digital input?  Can I use standard recording software?  Is there such a thing as recording from ASIO?  If so, what software supports that?  My Cool Edit Pro apparently does not.

Does the standard C-Media 8738 driver support bit-perfect recording, or must I use the DIO 2448 driver?

Jacob
Title: My tests over kmixer effects
Post by: KikeG on 2003-08-19 18:29:22
I already answered at the AVS thread. I did all my tests using regular Windows recording interface, and got bit-perfect results when using kernel streaming and ASIO playback  interfaces.

So, no ASIO recording is needed for bit-perfect playback.
Title: My tests over kmixer effects
Post by: Patsoe on 2003-08-22 00:13:23
Quote
There's some evidence that using directsound acceleration (also called hardware mixing) does same thing as using kernel streaming, and enables getting bit-perfect output. However, I haven't been able to verify this, since my Audiophile card doesn't support it.

I've tested hardware mixing today on a Terratec DMX 6fire 24/96 and can't confirm this evidence.

I used foobar2000 v0.667 for playback and CEP2.00 for recording; OS is Win2k SP3, Terratec driver version is 5.00.2000.128.

Setting kernel streaming in foobar, recording in digital loopback was bit perfect. So, I concluded CEP was fine as a recording interface.

Then I selected Directsound, and ticked 'Allow hardware mixing'. In Windows Sound&Multimedia Settings, there's a Hardware Acceleration slider. I tried all settings. In the higher two, foobar reports 'Hardware mixing available, 33 streams total'. In the lower two foobar says 'Hardware mixing not available'. In both cases, loopback was not bit-perfect: spectrally flat 1-bit dithering was present (and dithering in foobar was disabled, as were all dsp's, ofcourse).

I found the same using Waveout.
Title: My tests over kmixer effects
Post by: Peter on 2003-08-22 01:10:50
I suppose they just perform mixing/resampling at higher resolution (such as 32bit) internally, then downsample with dithering. Just like I would do if I had to design such thing.
Meh.
Only thing wrong here is that dithering shouldn't be happening when no mixing/resampling is done. Of course, dithering done properly should NOT be audible (ABX anyone ? I'm tired of BS talk about KS sounding "better").
Title: My tests over kmixer effects
Post by: AstralStorm on 2003-08-22 01:15:46
It depends on the card and its drivers.
TerraTec Aureon 7.1, for example, doesn't support hardware mixing,
but does provide bit-perfect playback of a single stream without it.
On the contrary, with Sensaura on, it resamples everything lower up to 48kHz,
even with Kernel Streaming. Only ASIO passes unmodified.
I could try to ABX Kmixer vs normal playback...
(it's easy to get this with my card, I can just use samplerate lock)
Title: My tests over kmixer effects
Post by: Patsoe on 2003-08-22 01:22:35
Quote
(ABX anyone ? I'm tired of BS talk about KS sounding "better").

True, but if SPDIF is your only means of getting something transferred to some other device, it would be nice to have no signal degradation, right?
Title: My tests over kmixer effects
Post by: Peter on 2003-08-22 01:37:50
No sane engineer seriously takes the possibility of pushing non-PCM data through such system.
Would you want to sacrifice the performance of the mixer for all people doing regular tasks to correct "problems" some people are having with bit-exact playback ?
Title: My tests over kmixer effects
Post by: AstralStorm on 2003-08-22 02:21:25
The test was brain-damaged.
Mangled sample and non-mangled in my test were both bit identical.
How can I force Kmixer to mangle something without making it resample?
(which I've ABXed agains non-resampled sample)
Title: My tests over kmixer effects
Post by: Patsoe on 2003-08-22 08:06:35
Quote
The test was brain-damaged.
Mangled sample and non-mangled in my test were both bit identical.
How can I force Kmixer to mangle something without making it resample?
(which I've ABXed agains non-resampled sample)

Good Astralstorm, you shouldn't stay up so late. I can't make anything of what you're saying! The test was brain-damaged? Mangled sample was bit-identical - then it wasn't mangled, or?

Edit: uhm, never mind. I get it now. I shouldn't get up so early...
Title: My tests over kmixer effects
Post by: KikeG on 2003-08-23 18:30:53
External hardware decoding of 44.1 KHz PCM-encoded AC3/DTS-CD files is impossible thanks to kmixer bit-mangling.
Title: My tests over kmixer effects
Post by: KikeG on 2003-08-23 18:35:43
And, even when hardware directsound acceleration could avoid kmixer bit-mangling, it's possible that the soundcard does its own mangling of  the digital signal. That happens for example with Creative cards when playing 44.1 KHz data.

So, in practice, I know no card that take advantage of the directsound acceleration kmixer bypassing at 44.1 KHz, for this reason.
Title: My tests over kmixer effects
Post by: Peter on 2003-08-23 18:52:22
That's because kernel mixer was designed to play sounds, not to let random noise get through untouched.
Title: My tests over kmixer effects
Post by: KikeG on 2003-08-24 20:58:24
Yes. But if I play something, I'd better prefer it being sent untouched to the DACs or digital outs than not. I agree it's not a big issue when just listening to music, but it can be under other special circumstances (measurements, data interchange, etc).

Edit: and it would be good too to shut people's mouths, you know.
Title: My tests over kmixer effects
Post by: Patsoe on 2003-08-24 21:52:02
Quote
So, in practice, I know no card that take advantage of the directsound acceleration kmixer bypassing at 44.1 KHz, for this reason.

Well, if I understand correctly, Astralstorm's Aureon Space does it right.

Why would this shut people's mouths?
Title: My tests over kmixer effects
Post by: KikeG on 2003-08-25 20:16:07
Quote
Well, if I understand correctly, Astralstorm's Aureon Space does it right.

But it does not support hardware mixing. There are some cards (better say some card's drivers) that are inmune to kmixer mangling, because they are not full WDM-compliant drivers. Aureon 7.1 seems to be one of those. RME cards are other. M-Audio cards are not.

Quote
Why would this shut people's mouths?

Because they won't talk anymore about kmixer decreasing sound quality.