Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: SPDIF data capture... Bit (a lot) imperfect.... I need your brains...

  1. #1

    Unhappy SPDIF data capture... Bit (a lot) imperfect.... I need your brains...

    Hi all, I have a decent media PC, win7 RME 9652 sound card, and after a lot of advice from folk I use j river media player. People advise using wasapi event driver, but on checking asio, kernel streaming and wasapi, I found asio a bit soft, wasapi a bit bright and ks is just right.

    I wondered about if there were measurable differences in the spdif data. Initially tried to capture to a creative x-fi ti on same machine, but lot of audible glitches. Then went into a lexicon omega capturing at 44/16 ( as per the source file). Tried analysis using fourierrocks, but a lot software problems. Then used another program to write out the wav files as text files. Moved to excel, and lined up the files.

    It is by no means bit identical! One of the samples (the 1st one using asio) has lots of visible differences, but the other three (asio(control), ks, wasapi) all visibly overlay, but at the bit level there are difference.

    What are the differences... It looks like the data is time shifted slightly. I could understand this if the omega resampled the data, but I thought that the digital transfer your simple sample the bit as they are, so with the odd error here and there some noise, but not time shifted slightly (by the way, i'm talking about less than 1/44k sec shift).

    Anyone got ideas... I can upload the data to dropbox so others can look...

    Last edited by Idiocratease; 06-02-2011 at 10:56 AM.

  2. #2
    Where is Vincent?

    In high-end audio, you can't even fight an opinion with the facts.

  3. #3
    I am just uploading a ppt with a bit more info about the approach I've used, and the excel file with all the sample data.

  4. #4
    Join Date
    Apr 2010
    Seattle, WA
    Some of that is easily explainable. In Windows Vista and 7, the operating system (Kernel) has a brand new audio pipeline. It converts all audio samples to floating point from integer values. It then performs mixing of sound from all applications trying to play something and optional sample rate conversions based on what you have set in the Sound control panel (plus a bunch of other signal processing such as bass management which is off by default). Once the final stream is available, it then needs to be converted to integer for the DAC to accept. Since we are going from a higher resolution floating point internal representation to fixed point PCM samples, dither must be used or we introduce distortion. So indeed, the kernel streaming pipeline will dither on the way out to the DAC. So if you captured the digital samples, you would indeed see that the low order bit has been changed for dither alone. If you didn't turn off resampling, you would see all the values changed. Ditto if you didn't set the volume control to 100%.

  5. #5
    Amirm, thanks for helping. i) I know about setting the vol to unity, so this is done at all points. All system sounds are off, and default sound device is the HDMI except J River, which is going to the RME Hammerfall soundcard. The gains are 0dB on the RME Soundcard. The way it's set the up there should not be any devices trying to pump data in to the RME Soundard. ii) If you are right (and I am guessing you are), that even when the soundcard is used exclusively by J River, that still it's converted to floating point, and then converted to integer, with dithering, this is why the lsb is jumping around in the silence.

    If there is no resampling (which there wasn't), and the soundcard is exclusive, bass management off etc, gain's at OdB will you still go to foating point in Kernel Streaming mode, and is this also true in ASIO and WASAPI... I'm trying to understand why I hear slight differences between these modes.

  6. #6
    Join Date
    Apr 2010
    Seattle, WA
    All correct. The audio pipeline doesn't know in advance if you are or not going to have the sound mixed or processed so it always converts to float on the way in, and back to integer on the way out, causing the LSB to toggle randomly.

  7. #7

    Dither Damage !

    Quote Originally Posted by amirm View Post
    All correct. The audio pipeline doesn't know in advance if you are or not going to have the sound mixed or processed so it always converts to float on the way in, and back to integer on the way out, causing the LSB to toggle randomly.
    Amir, Following of from my post above, and your comments/insight...I wonder if I could discuss a recent finding and see if it ties in with what you've indicated already. But before I go into this, I noticed I had deleted the files in dropbox, so I have recreated the original files (or close to), for those who are interested is the dither damage done.

    To the Point:

    Recently I decided to have another go at SACD/DVD-A due learning about HDMI audio de-embedders. So I got an Oppo DV-981HD, and selected the Aten VC880 de-embedder. The VC880 was my choice due to Toslink & SPDIF outputs. So now I can get SACD at 88KHz into my DAC (and probably up to full 192KHz material from the VC880, but this is not tested as yet).

    The sound is good. Very, very good in fact. And I am confident all's ok with the data in transportation from CD to my DAC.

    What I was quite surprised about was, when I played a standard CD through the Oppo --> Aten VC880 --> Chord QDB76 DAC. Compared to my Media PC... The sound from the CD was much smoother, clearer, and altogether nicer.

    Having not listened to a hard format disc for some years and battling away with my media PC, getting it fanless, really good soundcard (RME9652), optimizing OS and driver choice (Win 7 64bit/ASIO) I has been figuring I was getting CD quality out... [After all this effort and money with my Media PC, I think we can discount the placebo effect Please bear with me, as I am coming to the point]

    After listening back and forth to flac files I made from the original CD's vs. the CD's themselves via the Oppo route, (i.e. both digital sources are going into the same DAC and then onwards via same path to speakers), I was able to characterise real audible differences.. A graininess in the treble, a kind on noisy myst, and a grittiness around the edges of vocals... Well this is my best attempt to describe this. There may be a slight reduction of base depth, but this could be a perception effect caused by the apparent brightness increase around the upper frequencies.

    I was reminded of the data I collected and shared in this post above, and re-checked what you said about Windows always dithering... So it's clear from my observations and your comments that we can never get bit perfect from the PC as the Win Audio system goes to floating point and then dithers back to integer.

    Looking into the Dither subject, there is quite some art to ensure data is dithered away from the regions of hearing where the ear is most sensitive ( Which also gets me wondering if Microsoflt have paid such attention to their dithering, or just simply randomized the LSB.

    Anyway, I believe what's wrong with the audio from my PC is the dither applied, which necessarily means it's an impossibility to get bit perfect data from a CD rip. But more importantly at the 44KHz/16bit level, it's very audible effect (I think maybe 5dB noise?)

    I then turned my thought process to upsampling/oversampling. I am using J River Media Player, which allow e.g. 88 & 96 KHz sampling. So trying this I find that 88kHz sounds better that 96kHz with original 44KHz material. My guess is that 88 is an interpolation whereas 96 would be an extrapolation. I expect unless the algorithms are really good, the interpolation is a safer bet.

    Comparing CD's with the Media PC oversampling 44 --> 88kHz and playing flac's made from those very same CD's, I am now getting just about identical audio characteristics to the native CD.

    My theory/expectation is: that the oversampling is taking place in the floating point domain (at 32bit I suppose), and then interpolated to give the intermediate data point (in the floating point), then reconverted to integer, and then dithered. This to my mind, and assuming dither is random, will result in an effective halving of the noise generated by the dither.

    It is this which I would very much appreciate your thoughts on. Do you think this is right?

  8. #8
    Join Date
    Apr 2010
    Seattle, WA
    Good to see you again. I have not looked at your download files. SO a few points:

    1. Only the Windows standard audio pipeline performs the conversion to float and hence dither. If you use ASIO or WASAPI this is avoided altogether and you should get bit exact samples.

    2. Conversion of 44.1 to 88.2 or 96 both involve the same exact process of interpolation. It just turns out that 88.2 can be done with higher accuracy since it is an even multiple of 44.1. Whether that matters is another debate .

    3. On your comparison to CD, unless I read it wrong, you didn't have the same path as the CD player. I suggest getting an async USB to S/PDIF converter and using that to drive the same DAC and compare. An internal sound card is a different animal and you may be hearing that difference.

    4. If you are staying with Windows pipeline, did you check the sound control panel? By default it is set to 48 Khz so it is upsampling all of your CDs to that rate regardless of what JRiver is feeding it! In my experience setting that to 44.1 makes a good improvement.

  9. #9
    Thanks for the quick response. I am using the same DAC for conversion. It's only digital sources which differ. So what I am hearing is not related to eg the internal CD player DAC.

    Hmmm. I must admit that I interpreted that windows always went to FP. And this was the clear explanation for the LSB toggling you mentioned above in the files I shared... These were from WASAPI and ASIO outputs via an RME soundcard. So if it's not being dithered coming from FP, then there is still an open question about why the output differed so much in the files I shared previously.

    I take the point about interpolation being the same. I suppose at 88kHz, the proportion of original data is greater (dither or whatever notwithstanding).

    I will check the windows control panel, but I thought this was not such an issues as the audio path should be in exclusive mode? J River has a blue window and pop-up telling me that the output is bit perfect (44 kHz), even if the control panel has eg 48kHz/24bit. So that would imply that J River has exclusive control.

    Take a look at what you concluded earlier in the post re ASIO/WASAPI path still having dither applied and going via FP.


  10. #10
    Hi Amir, after much searching the only thing I can find which says that wasapi exclusive avoids the FP step is and the group thread where this info is derived. But it does indeed look like a reliable source of info.... So I am still in the dark....

    Maybe my original data collection was in error at the sampling end, rather than what was coming out of my pc spdif? But this was all driven by the fact I was hearing differences between wasapi and asio, and I still do, with asio sounding slightly better...

    And my recent getting back in touch, because the oppo sacd/cd --> hdmi de-embedder --> Dac is certainly better than my media PC. How can this be is wasapi and asio are giving me bit perfect ?

    Ps I have double checked the exclusive mod setting, and also for good measure made sure the shared mode rate is 44/16. Plus the default audio device is another sound card (the motherboard's hdmi actually).

    Your thoughts appreciated. Thanks, Alan

Page 1 of 3 123 LastLast

Similar Threads

  1. Lesson in the Anatomy of Cat Brains :)
    By MylesBAstor in forum Dog and Cat Forum
    Replies: 1
    Last Post: 01-28-2012, 09:06 PM
  2. Gadhafi Killed in Capture Attempt
    By Steve Williams in forum Off Topic Forum-Anything Goes
    Replies: 4
    Last Post: 10-20-2011, 11:22 PM
  3. Interesting News About Mobile Data Plans
    By Steve Williams in forum Smartphones And Tablets Forum
    Replies: 0
    Last Post: 07-05-2011, 04:07 PM
  4. Spdif
    By Vincent Kars in forum Vincent Kars On Computer Audio
    Replies: 1
    Last Post: 06-30-2011, 04:11 PM
  5. USB versus SPDIF
    By Vincent Kars in forum Vincent Kars On Computer Audio
    Replies: 0
    Last Post: 04-13-2011, 12:09 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts