• 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...)

OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
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.

You are right, I didn't think about it though it seems obvious. I will do that.
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
Boy, it was even uglier than expected.
First : Wasapi (event) 16 bit
Second : ASIO Focusrite driver

Wasapi.png

ASIO.png
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
Other information that could interest you:

1) No difference in distortion between Foobar2000 and JRiverMC 24.

2) In Foobar, no difference in distortion between Wasapi (event), Wasapi (push).

3) In JRiver, slightly higher distortion with Direct Sound than with Wasapi or Kernel Streaming or FlexASIO. See pictures.
First : Wasapi (note: Kernel Streaming and FlexASIO are at the same distortion level)
Second : Direct Sound
(for those two measurements, the level was set differently than in the previous post)

4) In Jriver, with the Focusrite ASIO driver, same crap than with Foobar.
 

Attachments

  • JRiver Wasapi.png
    JRiver Wasapi.png
    20.9 KB · Views: 414
  • JRiver DS.png
    JRiver DS.png
    24 KB · Views: 346
Last edited:
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
In REW, I use the same Focusrite ASIO driver for the input.
Perhaps this shit is due to using the same ASIO method in two different softwares?
 

Veri

Master Contributor
Joined
Feb 6, 2018
Messages
9,596
Likes
12,036
Other information that could interest you:

1) No difference in distortion between Foobar2000 and JRiverMC 24.

2) In Foobar, no difference in distortion between Wasapi (event), Wasapi (push).

3) In JRiver, slightly higher distortion with Direct Sound than with Wasapi or Kernel Streaming or FlexASIO. See pictures.
First : Wasapi (note: Kernel Streaming and FlexASIO are at the same distortion level)
Second : Direct Sound
(for those two measurements, the level was set differently than in the previous post)

4) In Jriver, with the Focusrite ASIO driver, same crap than with Foobar.
DS looks less 'bad' than I expected. This is at 100% Windows volume I suppose?
Seems like you can easily get away with using plain directsound.
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
DS looks less 'bad' than I expected. This is at 100% Windows volume I suppose?
Seems like you can easily get away with using plain directsound.
100% or 80%, I don't remember sorry.
 

zermak

Senior Member
Joined
Jun 2, 2019
Messages
372
Likes
251
Location
Italy
Interesting investigation.
So if I may ask are you using DS with 1:1 frequency rates or a fixed value on Windows sound output and so Windows does the upsampling? I am curious to know if with 1:1 (or maybe integer ratios) the performances stay the same or get worse.
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
Interesting investigation.
So if I may ask are you using DS with 1:1 frequency rates or a fixed value on Windows sound output and so Windows does the upsampling? I am curious to know if with 1:1 (or maybe integer ratios) the performances stay the same or get worse.

In Windows, my Scarlett is set to 16bit/44kHz, and in Foobar2000 and REW too.
 

zermak

Senior Member
Joined
Jun 2, 2019
Messages
372
Likes
251
Location
Italy
In Windows, my Scarlett is set to 16bit/44kHz, and in Foobar2000 and REW too.
Thank you and what about messing with the output rates in DS? I am curious to know how bad (and if) is the Windows resampler.
And the bit depth? I guess it will not affect the quality at all and Windows will just pad it in a higher bit depth rather than dither it (like modern DAC do if I remember correctly).
I've read the article on archimago blog about software volume but he doesn't talk about the above and it would be nice to get some info about it for me to set Windows audio properly with the lowest loss in performance in DS mode (on a technical point of view cause I doubt I can spot to the differences while listening, mainly with my audio setup).
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
I will try to do some more testing with various bitrates, but I think it it very dependant on the soundcard/DAC.
 

zermak

Senior Member
Joined
Jun 2, 2019
Messages
372
Likes
251
Location
Italy
Yes, sure but as long as you use the same cards we can evaluate if there are benefits in using 1:1 rates and so on :)
 

BYRTT

Addicted to Fun and Learning
Forum Donor
Joined
Nov 2, 2018
Messages
956
Likes
2,452
Location
Denmark (Jutland)
@daftcombo, @zermak

Think studying below visual should show why pro and audiophiles run WASAPI or ASIO and for DS most set their Windows sound system to 44,1kHz because thats what most web stuff run at, when SRC is used notice the amplitude and phase distortion (grey phase curve is how minimum phase should have looked for that particular amplitude response) plus all that hash/grass that grows up in GD graphs, when ASIO is used notice how distortion graph is lovered to insane low levels because test is run using soundcards SPDIF I/O (no ADC/DAC in loop) and GD graph gets simply a perfect thin line verse the hash/grass at HF using DS.

For daftcombo's trouble shooting i would try switch to another USB cable and then another USB port and see what happens, if that doesn't work then try analyze if interface can perform well on another computer or another interface can perform well on the trouble computer.

1006.png
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
Ok, I just noticed that REW was running at 24bit.
So I went to Windows control panel
and changed the Focusrite setting from "16bit" to "24bit"
and did a sweep in Foobar with Wasapi (event) 16 bit again.

Guess what? I had the same shit exactly (distortion) that I had with ASIO in Foobar!

What to conclude?
 
OP
daftcombo

daftcombo

Major Contributor
Forum Donor
Joined
Feb 5, 2019
Messages
3,687
Likes
4,068
And same shit again with Wasapi (event) 24bit in Foobar + 24bit in Windows.

Hmm perhaps it is when you have 16bit for AD and 24 for DA, or the other way around, that shit happens?

Edit: With 16bit AD and 24bit DA it is ok. With 16bit AD and 24bit DA it is ok.
With 24bit AD and 16bit DA, it is ok. With 24bit AD and 24 bit DA, not ok.
Can someone explain that to me?
REW seems to always run at 24bit for recording (according to the status bar).

Edit 2: Well, just found the answer to my question. It applies to my soundcard:


Applies to: Scarlett (whole range)
When using the WDM driver, 16-bit or 24-bit modes can be selected from the Windows Sound panel (right-click on the device and select Properties > Advanced to find this setting). However, this setting has absolutely no effect when recording using the ASIO driver, which users should always use in DAWs, due it's its low latency and increased performance over WDM (Windows' own audio driver).
The audio stream captured from our hardware is always 24-bit samples. These samples are not altered or processed in any way by the driver when recording. The Windows audio control panel may say the device is in 16 bit mode, but the ASIO driver bypasses the Windows audio system, and is therefore not affected by this setting.
Therefore, using 24 bit depth in your recording software, while using the ASIO driver, is still 24 bit when recording/creating, where 24 bit actually matters.
 
Last edited:

zermak

Senior Member
Joined
Jun 2, 2019
Messages
372
Likes
251
Location
Italy
@daftcombo, @zermak

Think studying below visual should show why pro and audiophiles run WASAPI or ASIO and for DS most set their Windows sound system to 44,1kHz because thats what most web stuff run at, when SRC is used notice the amplitude and phase distortion (grey phase curve is how minimum phase should have looked for that particular amplitude response) plus all that hash/grass that grows up in GD graphs, when ASIO is used notice how distortion graph is lovered to insane low levels because test is run using soundcards SPDIF I/O (no ADC/DAC in loop) and GD graph gets simply a perfect thin line verse the hash/grass at HF using DS.
-cut-
So basically DS is alright to use in 1:1 ratio with the frequency of the audio the program uses; let's say games and other standard stuff like system sounds ahah and maybe sufficient even with movies, but it is actually crap (as we already knew) for audio processing considering the bad results.
I only use DS in games (and maybe a few uses WASAPI shared but I am not sure about it) but I let Windows resample it at 4x; I guess I will stick with the 1:1 unless you have some proof that Windows DS isn't that bad with (integer) multiples of the frequency used.
 

Veri

Master Contributor
Joined
Feb 6, 2018
Messages
9,596
Likes
12,036
@daftcombo, @zermak

Think studying below visual should show why pro and audiophiles run WASAPI or ASIO and for DS most set their Windows sound system to 44,1kHz because thats what most web stuff run at, when SRC is used notice the amplitude and phase distortion (grey phase curve is how minimum phase should have looked for that particular amplitude response) plus all that hash/grass that grows up in GD graphs, when ASIO is used notice how distortion graph is lovered to insane low levels because test is run using soundcards SPDIF I/O (no ADC/DAC in loop) and GD graph gets simply a perfect thin line verse the hash/grass at HF using DS.

For daftcombo's trouble shooting i would try switch to another USB cable and then another USB port and see what happens, if that doesn't work then try analyze if interface can perform well on another computer or another interface can perform well on the trouble computer.

View attachment 27805

So the big question. When using 44/44 or 48/48, is the 0,002% distortion audible in any way over ASIO?
 

andreasmaaan

Master Contributor
Forum Donor
Joined
Jun 19, 2018
Messages
6,652
Likes
9,399
@daftcombo, @zermak

Think studying below visual should show why pro and audiophiles run WASAPI or ASIO and for DS most set their Windows sound system to 44,1kHz because thats what most web stuff run at, when SRC is used notice the amplitude and phase distortion (grey phase curve is how minimum phase should have looked for that particular amplitude response) plus all that hash/grass that grows up in GD graphs, when ASIO is used notice how distortion graph is lovered to insane low levels because test is run using soundcards SPDIF I/O (no ADC/DAC in loop) and GD graph gets simply a perfect thin line verse the hash/grass at HF using DS.

For daftcombo's trouble shooting i would try switch to another USB cable and then another USB port and see what happens, if that doesn't work then try analyze if interface can perform well on another computer or another interface can perform well on the trouble computer.

View attachment 27805

That's fascinating, thanks. Do you have a source for it or is it from your own experimentation?
 

BYRTT

Addicted to Fun and Learning
Forum Donor
Joined
Nov 2, 2018
Messages
956
Likes
2,452
Location
Denmark (Jutland)
So basically DS is alright to use in 1:1 ratio with the frequency of the audio the program uses; let's say games and other standard stuff like system sounds ahah and maybe sufficient even with movies, but it is actually crap (as we already knew) for audio processing considering the bad results.
I only use DS in games (and maybe a few uses WASAPI shared but I am not sure about it) but I let Windows resample it at 4x; I guess I will stick with the 1:1 unless you have some proof that Windows DS isn't that bad with (integer) multiples of the frequency used.

For this new loopback test seen below it looks stay 1:1 because there is response changes in first row and exploting bloom into GD row, that said one cant know if supported Windows driver for my card is well written code but at least it looks perfect written when runnning in ASIO mode and WASAPI is probably same as ASIO but REW dont support WASAPI.
1007.png


So the big question. When using 44/44 or 48/48, is the 0,002% distortion audible in any way over ASIO?

Probably not but we stay free of the GD HF exploting bloom and get automatic shifting track material rates (audiophile) :) by the way such hash/grass i also noticed running Win10 native UAC2 driver for ASUS U7, where DS driver from ASUS had not that grass so probably its good thing check systems with loopback test. That said as told above one cant know if supported Windows driver for my old PCI card is well written code but at least it looks nearly perfect written when runnning in ASIO mode.

That's fascinating, thanks. Do you have a source for it or is it from your own experimentation?

Welcome, test is my own simple loopback test in Win7 and using that soundcards SPDIF I/O's feature gives less noice in loop to reveal Windows SRC differences than using its ADC/DAC loop.
 
Last edited:

bennetng

Major Contributor
Joined
Nov 15, 2017
Messages
1,634
Likes
1,692
I've read the article on archimago blog about software volume but he doesn't talk about the above and it would be nice to get some info about it for me to set Windows audio properly with the lowest loss in performance in DS mode (on a technical point of view cause I doubt I can spot to the differences while listening, mainly with my audio setup).
Hi, I am the author. In my own digital loopback tests Windows SRC indeed has higher distortion when using "non-divisible" sample rates. Here are some of my tests with the soundcard's master clock at 48kHz. I am not saying it is audible but just in case if you are curious.
rmaa.png


You can also try the WASAPI shared mode plugin as well. It handles volume (specifically the limiter) better than the bundled DS module in my machine.
https://www.foobar2000.org/components/view/foo_out_wasapis

Here are some test files to try out. Be careful when using exclusive mode since the limiter in Windows mixer is supposed to be bypassed and a.mp3 should clip relentlessly until foobar's volume control is at -12dB.
https://www.audiosciencereview.com/...y-of-software-volume-control.5922/post-172865

When using non-exclusive modes, take a look at the system mixer's volume of individual apps and make adjustments to suit your needs.
mixer.png
 

zermak

Senior Member
Joined
Jun 2, 2019
Messages
372
Likes
251
Location
Italy
@BYRTT Thank you for the report, very usefull and indeed revealing. I will stick at 1:1 in DS mode :D

@bennetng I have read it but maybe I missed it or forgot about that part (probably the latter) and so thank you for the reminder.
About volume contol I've just found that my stereo amp prefer a 1Vrms input through its RCAs in so is there a way to fix it in Windows considering that at full volume (0dBFS?) the Khadas TB I am using has a 2Vrms output? And again; will ReplayGain affects the output too? I guess it will so maybe I can use ReplayGain to adjust all my library to output 1Vrms changing the 89dB target volume of ReplayGain itself and then rescan my library. Just wondering. Or maybe the inner volume control of the Khadas TB available by installing its USB drivers is the way to go? (note for the above: I just played the two audio files you suggested and the file a.mp3 (which is made to clip) keeps clipping while adjusting the Khadas inner master volume but it doesn't, as you said, if I lower the foobar volume (or using ReplayGain which suggests a -19.15dB gain; and for completeness a -7.11dB gain for the b.mp3 file).

And again out of curiosity, but maybe I am going OT, I used the Windows volume at 76% in past with my Asus Xonar DX sound card because it seems (by Uni Xonar driver developers) that it could cause volume fluctuations in certain situations (source).

I will sure give a try to the WASAPI shared mode and the audio files and I will report back waiting some tips for a possible solution of the 1Vrms output (which will benefit the O2 headphone amp too probably).
 
Top Bottom