• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Kernel Streaming, ASIO, WASAPI... and music players (Foobar, JRiver...)

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
On my computer, with my Apogee Duet 2, with ASIO4All, there are small glitches (like small clicks) before the music starts when I use 64-bit mode and sometimes the very beginning of a song is eaten. It does not happen with my Focusrite Scarlett 2i4 2nd Gen nor Topping D10 used with their respective drivers (with ASIO4All i'm not sure, IIRC think it's fine too). With the Duet I tried 32-bit this morning and didn't notice any glitch.

I'm not terribly surprised. Exotic software chains like these are not necessarily very well-tested (contrary to, say, the standard Windows audio APIs), and the ASIO API specification can be somewhat ambiguous and hard to understand when it comes to things like priming (i.e. starting the stream), making incompatibilities between applications and drivers more likely.

If you're experiencing glitches with ASIO4ALL I would suggest filing a bug report against them, but note that this could also be a bug in the foobar ASIO plugin. The fact that this is happening in 64-bit and not in 32-bit is probably due to some coincidence (possibly undefined behavior creeping up in different ways) and is not necessarily an interesting observation in and of itself.

You can also try FlexASIO if ASIO4ALL is not working well for you. Full disclosure: I wrote that driver.
 
Last edited:

noel_fs

Active Member
Joined
Dec 12, 2018
Messages
270
Likes
181
Im curious more than anything, how can you use kernel streaming on W10?
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
Im curious more than anything, how can you use kernel streaming on W10?

The same way you would in any other Windows version: by using an application that natively supports KS, or indirectly via something like ASIO4ALL or FlexASIO.

(It is indeed surprising that KS still works on Windows 10, though. Every other Windows Audio API goes through WASAPI nowadays, but as far as I can tell KS still has its own dedicated code path. Most likely Microsoft doesn't care and just lets it sit there.)
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
My Apogee Duet 2 won't work in DirectSound nor Wasapi on Foobar. Only ASIO4All.

But no problem to have sound in Chrome. What does Chrome use?
 

DKT88

Active Member
Joined
Feb 26, 2019
Messages
221
Likes
232
Location
South Korea
Thanks for the explanations. I'm looking at the diagram of FlexASIO in your documentation. My DAC provided an ASIO driver which I'm using, is this the the ASIO driver that is shown between the ASIO host application and the frontend? Or is my ASIO driver the one shown in the audio hardware block?
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
I'm looking at the diagram of FlexASIO in your documentation. My DAC provided an ASIO driver which I'm using, is this the the ASIO driver that is shown between the ASIO host application and the frontend? Or is my ASIO driver the one shown in the audio hardware block?

If you're using a native ASIO hardware developed for your hardware, then the FlexASIO diagram doesn't apply, because you're not using FlexASIO. Part of the native ASIO driver runs inside your ASIO Host Application as a DLL, because that's how the ASIO API works; but after that, it completely depends on the specific implementation of the driver you're using and is completely up to the driver developer. For example, the native driver could be interacting directly with the WDM driver for your DAC in some custom, non-standard way to configure it and transfer audio buffers.
 

DKT88

Active Member
Joined
Feb 26, 2019
Messages
221
Likes
232
Location
South Korea
If you're using a native ASIO hardware developed for your hardware, then the FlexASIO diagram doesn't apply, because you're not using FlexASIO. Part of the native ASIO driver runs inside your ASIO Host Application as a DLL, because that's how the ASIO API works; but after that, it completely depends on the specific implementation of the driver you're using and is completely up to the driver developer. For example, the native driver could be interacting directly with the WDM driver for your DAC in some custom, non-standard way to configure it and transfer audio buffers.
I am using what I think is a native asio driver that was provided by Aune. Do you know of a reference that I could read to start to understand the general architecture concepts and how ASIO is implemented?
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
Do you know of a reference that I could read to start to understand the general architecture concepts and how ASIO is implemented?

There is no "standard" way to implement an ASIO driver that I know of. ASIO is just an interface; it specifies the interaction between the host application and some DLL that implements the driver, but it doesn't say (or even suggest) anything about how the driver should work behind the scenes. That's kind of the point of a software interface. It's much like, the USB specification doesn't say anything about how the laser pointer in your mouse should work: it's only concerned about interoperability and compatibility, not how devices are actually made.

I honestly have no idea how native, manufacturer-provided ASIO drivers work. They are all closed-source, which means understanding how they work would likely require some reverse engineering, which might not be trivial. I also have no idea if most native ASIO drivers follow a similar pattern in how they work, or if they all do their own thing.

If you want more information on how the ASIO interface itself works, you can look at the ASIO documentation which is in a PDF in the ASIO SDK. Fair warning: that doc is directed to an audience familiar with C/C++ and low-level software engineering concepts. Alternatively, feel free to ask questions, and I'll try to answer them as best I can.
 

urfaust

Active Member
Joined
Sep 25, 2018
Messages
113
Likes
59
Location
France
I have the Khadas toneboard and using Qobuz and Tidal (trying them out both at the moment). In Qobuz i get either "Wasapi in exclusive mode" or the "USB driver" of the Khadas board. Which one would be preferable? To me the usb driver option sounds a little better but hard to tell whithout comparing for hours. Both the exclusive mode and usb driver still have windows volume control on Qobuz (not in Tidal) so this tells me it's not bitperfect. I m just wondering if anybody had figured this out already.
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
I have the Khadas toneboard and using Qobuz and Tidal (trying them out both at the moment). In Qobuz i get either "Wasapi in exclusive mode" or the "USB driver" of the Khadas board.

"USB driver" is kinda of vague, it's not clear what that's supposed to mean. Can you point to some documentation?

Which one would be preferable? To me the usb driver option sounds a little better but hard to tell whithout comparing for hours.

I would assume they will sound the same until proven otherwise.

Both the exclusive mode and usb driver still have windows volume control on Qobuz (not in Tidal) so this tells me it's not bitperfect.

The fact that the Windows volume control still works doesn't mean it's not bit-perfect. If your DAC has hardware gain control, the Windows volume control will just use that instead of software volume control. The audio samples are not modified, Windows just tells your DAC to adjust its output level.
 

DKT88

Active Member
Joined
Feb 26, 2019
Messages
221
Likes
232
Location
South Korea
There is no "standard" way to implement an ASIO driver that I know of. ASIO is just an interface; it specifies the interaction between the host application and some DLL that implements the driver, but it doesn't say (or even suggest) anything about how the driver should work behind the scenes. That's kind of the point of a software interface. It's much like, the USB specification doesn't say anything about how the laser pointer in your mouse should work: it's only concerned about interoperability and compatibility, not how devices are actually made.

I honestly have no idea how native, manufacturer-provided ASIO drivers work. They are all closed-source, which means understanding how they work would likely require some reverse engineering, which might not be trivial. I also have no idea if most native ASIO drivers follow a similar pattern in how they work, or if they all do their own thing.

If you want more information on how the ASIO interface itself works, you can look at the ASIO documentation which is in a PDF in the ASIO SDK. Fair warning: that doc is directed to an audience familiar with C/C++ and low-level software engineering concepts. Alternatively, feel free to ask questions, and I'll try to answer them as best I can.
Ok thanks I'll start with the PDF.
 

urfaust

Active Member
Joined
Sep 25, 2018
Messages
113
Likes
59
Location
France
"USB driver" is kinda of vague, it's not clear what that's supposed to mean. Can you point to some documentation?



I would assume they will sound the same until proven otherwise.



The fact that the Windows volume control still works doesn't mean it's not bit-perfect. If your DAC has hardware gain control, the Windows volume control will just use that instead of software volume control. The audio samples are not modified, Windows just tells your DAC to adjust its output level.

Im referring to this, this is what Qobuz let met select (but not Tidal's dropdown menu)

TUSB.jpg


Qobuz

qobuz.jpg




Tidal

Tidal.jpg





Yes right about the volume control, i found out that in the TUSBaudio's tab on the right, if i turnup the volume it actually shows up here, so this is acting directly on the device.

I just found interesting it let me select that particular option only in Qobuz.
 

edechamps

Addicted to Fun and Learning
Forum Donor
Joined
Nov 21, 2018
Messages
910
Likes
3,620
Location
London, United Kingdom
Mmm, interesting, this "TUSBAudio" thing seems to be a third party USB Audio Class driver - basically an alternative to Microsoft's driver. So, if I understand correctly, you have a choice between using that driver in WDM mode or through ASIO. Again, I would not expect any audible difference between these modes, as long as the driver is implemented correctly - just pick what's most convenient for you and call it a day.
 

BYRTT

Addicted to Fun and Learning
Forum Donor
Joined
Nov 2, 2018
Messages
956
Likes
2,452
Location
Denmark (Jutland)
Mmm, interesting, this "TUSBAudio" thing seems to be a third party USB Audio Class driver - basically an alternative to Microsoft's driver. So, if I understand correctly, you have a choice between using that driver in WDM mode or through ASIO. Again, I would not expect any audible difference between these modes, as long as the driver is implemented correctly - just pick what's most convenient for you and call it a day.

For info "TUSBAudio" control panel is package is from German company "Thesycon Systemsoftware Consulting GmbH" to control XMOS UAC2 family chips, for current win10 we can choose run without that package and use MS native UAC2 build in driver but then ASIO feature will be missing and that contoll panel can also tell or control other neat things about current status, for example the "Status" tab seen above can reveal if samplerate change on the fly relative to track material.
 

trl

Major Contributor
King of Mods
Joined
Feb 28, 2018
Messages
1,967
Likes
2,523
Location
Iasi, RO
With the Thesycon driver you get a nice Control Panel in systray that shows you details about your connectivity and transfer type from computer to the XMOS transport. Also, with the Thesycon you'll get native DSD playback to max. possible by the transport and DAC. I recommend the Thesycon drivers.
 

zermak

Senior Member
Joined
Jun 2, 2019
Messages
372
Likes
251
Location
Italy
The Thesycon driver solved my video judder problems I had with the standard Windows USB Audio 2.0 driver while watching videos with the MadVR + WASAPI Exclusive combo.
Little side effect is that it doesn't show semple rates higher than 192000Hz 32bit in Default formats for the Windows audio system but I am fine with it because I am good with the 176400Hz 32bit setting for normal listenings (or games).

About DSD playback: I am new to it but tried a few tracks. With a DSD64 track (2822400Hz at 1bit), using direct DSD + WASAPI or ASIO output in foobar2000, I get a sample rate of 176400Hz. It looks like the DAC or something else decodes it to PCM 16bit; is it normal?
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
Ok no joke:

I've captured sweeps in REW with a file playing in Foobar2000.
Lots of sweeps with the ASIO driver for my Focusrite Scarlett 2i4 2nd Gen.
When playing VERY LOUD (with earplugs), I had peaks of distortion above 2kHz, where I have boosts applied with a convolution file.
I was puzzled, why those peaks didn't appear with the REW internal sweeps, with no boosts then but louder in volume (I speak of 100dB or so).
So I tried and switched to Wasapi (event), 16bit, in Foobar and did the same sweep. The distortion peaks, which were at 2% or so, completely disappeared. And as a matter of fact, it sounds better!!! Especially cymbals which I founded harsh before.

I could post pics but don't feel the need to. There is something wrong with Foobar2000 + SoX + Convolver + ASIO drivers which doesn't happen with Wasapi (event) 16 bit.
Try for yourself.
 
  • Like
Reactions: trl

trl

Major Contributor
King of Mods
Joined
Feb 28, 2018
Messages
1,967
Likes
2,523
Location
Iasi, RO
Wondering if you could do same test by using ASIO4ALL. Of course, pictures might help too. Thanks!
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
Asio4All & Focusrite drivers gave the same distortion.
By using Wasapi, with very loud levels, the total harmonic distortion falls from 2% to 0.5% in the 2kHz - 18 kHz area.
I plan to do some extensive testing to find out the real cause.

When using Asio drivers and doing the sweep in REW directly, distortion is low too.
So the issue is specific to Foobar with SoX with Convolver and my specific impulse.
 

trl

Major Contributor
King of Mods
Joined
Feb 28, 2018
Messages
1,967
Likes
2,523
Location
Iasi, RO
So, basically, you tested the audio signal coming directly from the speakers, right?

But what about testing the output signal coming directly from the DAC-output (balanced or unbalanced plugs)? It would be nice to compare if the same increase in distortion can be seen on Focusrite's RCA/XLR plugs too.
 
Top Bottom