• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required as is 20 years of participation in forums (not all true). Come here to have fun, be ready to be teased and not take online life too seriously. We now measure and review equipment for free! Click here for details.

How does Windows handle audio device sample rate and bit depth?

JEntwistle

Member
Forum Donor
Joined
Oct 25, 2019
Messages
58
Likes
64
#1
I am hoping someone can explain how Windows handles audio device sample rate and bit depth?

Here is my situation:

I have a TEAC NT-503 connected to my Windows PC via USB. I have installed the TEAC drivers (I thinks ASIO). TEAC provides their own playback software. When I use the TEAC software, both the software and the DAC report the correct bit depth and sample rate; e.g..: 16/44.1 or 24/96

Now I have added Amazon Unlimited HD. This needs to be played through Amazon's own software, so I can't use the TEAC software. Now it appears that the DAC is reporting whatever setting I choose in Windows Audio Properties. If I select the TEAC output device, then I can choose the quality in Windows per this table:
Digital outputs.png


I am trying to play a file that Amazon says is 24/96. It appear that I can choose any of the above options in Windows, and the DAC says that is what it is playing. For example, if I pick 24/192, the DAC shows 192 kHz.

What is Windows actually doing here? Is it upsampling (or downsampling), or is it just playing the native file and labeling it based on what I choose in this menu? (I don't think I want Windows doing any upsampling for me.) Does it matter what I pick here? i.e.: Is it best to manually change this whenever my input file changes?

EDIT: I need to add that the Amazon software appears to report whatever is selected in Windows. It shows this table. Whatever I set in Windows shows as the "Device Capability" in Amazon's software.
Amazon.PNG


Thanks for you help.
 
Last edited:
Joined
Sep 21, 2019
Messages
89
Likes
12
#2
My dac does a similar thing if I switch of exclusive mode in tidal
Dac shows 192khz for all tracks
That's what windows is set at.
Also have a track xmos shows 44khz but dac shows 352khz.
 

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
847
Likes
1,243
#4
As far as I understand, the audio Amazon is sending to your DAC is routed through the windows mixer, and that sets the sampling rate and bit depth based on what you chose in that table. It resamples the data to conform to that quality and then sends it to the dac. The dac doesn't know what quality the original audio was at, just what windows sent it, so that's what it's displaying.

I am not familiar with the Amazon service or interface, but I'm very skeptical they have audio in 24/96. It's probably all in 16/44 like regular CDs. It's probably best to leave the quality of the windows menu at 44.1khz and 24 bit (or 32 bit if it's not causing any trouble – though there is practically no difference) when you are listening through Amazon HD. You can try setting it to higher sample rate and see if you hear any difference in a blind test. There is low chance that you will.
 
OP
J

JEntwistle

Member
Forum Donor
Joined
Oct 25, 2019
Messages
58
Likes
64
Thread Starter #5
Hi Fluffy. Thanks for the reply. So if the Windows mixer is set to the same sampling rate and bit depth as Amazon says it delivers, does it re-mix, or does it essentially say the input/output match up, so it does not need to do anything?
 

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
847
Likes
1,243
#6
I'm really not an expert on what goes on in the background of those processes. I assume that if an application gives windows an audio stream at a sample rate that matches what it's supposed to output, it will not resample it. Being it a mixer, I think it's constantly "mixing" the audio different applications are sending it (say if you hear a system sound while playing music, that's one example), but if it only receives one audio stream at a time, it doesn't need to do anything to it.

Personally I only use windows direct sound when listening to music, which routes everything through the windows mixer. I haven't been able to detect any audible advantage to using ASIO or WASAPI to send the bits directly to the dac, and using the windows mixer gives me functionality that I otherwise wouldn't have (like digital volume control and using apps like EQ APO).
 
Joined
Nov 13, 2019
Messages
2
Likes
0
#7
I am not familiar with the Amazon service or interface, but I'm very skeptical they have audio in 24/96. It's probably all in 16/44 like regular CDs.
It's 24/96 if they say it is. If you have Amazon Music HD, some music is available in 16/44 and some is available in higher bitrates/bitdepths (I've seen 24/44.1, 24/96, and 24/192).
 

BDWoody

Major Contributor
Forum Donor
Joined
Jan 9, 2019
Messages
2,806
Likes
5,584
Location
Mid-Atlantic, USA. (Maryland)
#8
I am not familiar with the Amazon service or interface, but I'm very skeptical they have audio in 24/96. It's probably all in 16/44 like regular CDs. It's probably best to leave the quality of the windows menu at 44.1khz and 24 bit...
15736818086313110790086463182435.jpg


I am messing around with a different DAC, so it is converting, but doesn't have to.
Looks pretty legit...sounds great.
 

audimus

Senior Member
Joined
Jul 4, 2019
Messages
458
Likes
404
#10
A quick primer on Windows Audio that is relevant here. Since this seems to create confusion in many threads.

Windows supports multiple audio architectures to be used based on need.

Just above the list of things that you show in the screenshot, it says it is the configuration to be used in shared mode. This setting does not apply to exclusive mode access.

The default when you install a driver into Windows 10 in most cases is a shared mode. This is what one would want when one is connecting to an audio device to get sound out of the PC (system sounds, various application sounds, content played by applications, etc). Since all of these can be happening in parallel, Windows has a built in mixer that allows all these different sources to come in and mixes them and sends them out based on the capabilities advertised by the sound device. You can manually select the input parameters in that list so that all sources connected to the Windows mixer via shared mode are resampled to that selection (you can also have for example, Dolby Live as one of the choices there if the driver supports it to on-the-fly convert incoming multi-channel sound via S/PDIF to an optical port for example). The DAC sees the output resolution sent by Windows mixer which is typically the selection made in your list.

The above is not meant for bit perfect audio reproduction or recording or for low latency applications.

Windows has a direct mode where applications can bypass the Windows mixer and directly send content in the format that is supported by the connected destination. This allows, for example, an application like foobar 2000 or JRiver to query for supported formats of the destination. This is listed in a different tab called supported formats not in the Advanced tab you have in the picture. Then based on content, these applications can either resample or send bit perfect at a supported resolution or rate without the Windows mixer coming in the way. The DAC sees what the application is sending in this mode.

The downside to this is that since there is no mixer in the middle, only one content source can be using it at any time and all other sounds including Windows system sounds will not be able to be heard when one application has requested and using the Direct Mode which is an exclusive mode for the reason above.

But for this to happen, you need to check allow exclusive mode in the settings below the list you have pictured and give such exclusive use priority if you don’t want to be interrupted during the use of that exclusive use.

In addition, the application must be able to use direct mode - not all applications do. In particular, the Amazon music app does not seem to be able to do Direct Mode, so it just uses the shared mode with the setting you have selected in that list with the music going through the Windows mixer. The mixer will resample to the selected resolution in that list. So the DAC will see whatever is selected there.

Both of the above systems depend on the Windows OS providing an abstraction of an audio device with a speaker configuration, etc.

There is also a hardware direct mode where a driver may allow direct interfacing with the hardware bypassing even the above abstraction or the exclusive mode. This is what ASIO was developed for. To windows this looks just like some data going to a device on a bus and no concept of what that data is let alone audio. This requires the application using it to interact with that hardware driver and provide the configuration settings in its interface along with any mixing or mapping of channels available in the output device to speaker channels if required, etc. This is what DAWs or professional recording or playback applications do. A specialized card or device may provide software drivers for both an ASIO access to the device as well as set up a virtual audio device to make it available through the Windows audio systems for applications that want a playback or recording device abstraction in direct or shared mode. Good content players may also support this hardware direct mode for playback. Nothing in the Windows audio device manager settings is relevant to this hardware direct use.

Hope that helps.
 
Last edited:

Ratatoskr

Active Member
Joined
Nov 22, 2018
Messages
125
Likes
81
#11
I doubt Amazon Music HD will ever offer ASIO or Wasapi exclusive mode in their desktop app. I could be wrong though. The best thing Amazon has done entering HD streaming, botched as the roll out is, it to put price pressure on Tidal and Qobuz. At least in the US Qobuz already lowered price of their Studio package to $14.99 a month. ASIO and Wasapi exclusive mode with up to 24/192.
 

audimus

Senior Member
Joined
Jul 4, 2019
Messages
458
Likes
404
#12
It is not necessary for a media player application to use the low level WASAPI or ASIO APIs to play bit perfect audio to a device bypassing the Windows Audio Engine in exclusive mode. Those are needed if low latency is critical for a DAW or real time communication applications. Streaming music does not require this nor is it necessary for best possible fidelity. The main thing that determines fidelity is whether you bypass the Windows audio engine and go direct in exclusive mode and can play a sample rate that the end device supports on your own.

The higher level APIs are the older MME or the newer WDM (which may use WASAPI at the lower level or do kernel streaming). The latter is sufficient for music players and will allow exclusive mode bypassing Windows Mixer or use the shared mode through Windows mixer. But doing the former comes at a cost.

The problem for quick hack solutions like Amazon music program is whether they include sample rate conversions and to a smaller extent their own volume control. It is easier to hack up a solution with MME earlier or with WDM now in shared mode where Windows Audio Engine takes care of all of that. But to do direct exclusive mode, they will need to include those since they don’t have control over what sample rates may be available for the destination when the content is available at several sample rates. It is not trivial to do high fidelity sample rate conversions and quick solutions might be worse than going through Windows Audio Engine.

You can still get bit perfect audio in shared mode and without any audio processing (but at higher latencies which won’t affect music streaming) but it requires the user to manually select the correct sample rate and avoid resampling only if source sampling matches selected setting as the OP discovered and ensure all effects are turned off in the audio device manager. It is the Windows sample rate converter and the software effects processing that you want to avoid in the shared mode.

One way to automate the sample rates selection using low level APIs (Kernel Streaming or ASIO) when music players don’t support it, is using something like Voicemeeter. You configure its output to use the low level drivers and use its virtual device as the default audio device. Since Voicemeeter supports all sample rates, the rudimentary music player can just play whatever sample rate it has as if playing to a shared device and Voicemeeter will send it out bit perfect if possible and do sample rate conversions better than Windows can or what Amazon can do with their limited expertise.
 

gvl

Major Contributor
Joined
Mar 16, 2018
Messages
2,087
Likes
1,928
Location
SoCal
#13
Amazon app is crap, not fit to deliver on the HD promise for the reasons stated above. Maybe there will be hardware solutions able to play at the native resolutions. For HD streaming on PC Tidal or Qobuz is the way to go.
 

Julf

Major Contributor
Forum Donor
Joined
Mar 1, 2016
Messages
1,724
Likes
1,976
Location
Amsterdam, The Netherlands
#14
Amazon app is crap, not fit to deliver on the HD promise for the reasons stated above.
What is the "HD promise"?
 

Julf

Major Contributor
Forum Donor
Joined
Mar 1, 2016
Messages
1,724
Likes
1,976
Location
Amsterdam, The Netherlands
#16
If I buy HD streaming I should be able to deliver the exact bits that I purchased to my digital audio decoding device.
OK, fair enough, but in that sense "HD" is no different from any other lossless service.
 

gvl

Major Contributor
Joined
Mar 16, 2018
Messages
2,087
Likes
1,928
Location
SoCal
#17
OK, fair enough, but in that sense "HD" is no different from any other lossless service.
Amazon calls CD quality HD, so it's a moot point. And unlike Amazon other lossless services got it right.
 

Julf

Major Contributor
Forum Donor
Joined
Mar 1, 2016
Messages
1,724
Likes
1,976
Location
Amsterdam, The Netherlands
#18
Amazon calls CD quality HD, so it's a moot point. And unlike Amazon other lossless services got it right.
Yes, my point was that "HD" is a pretty meaningless marketing term.
 
OP
J

JEntwistle

Member
Forum Donor
Joined
Oct 25, 2019
Messages
58
Likes
64
Thread Starter #20
A quick primer on Windows Audio that is relevant here. Since this seems to create confusion in many threads.

Windows supports multiple audio architectures to be used based on need.

Just above the list of things that you show in the screenshot, it says it is the configuration to be used in shared mode. This setting does not apply to exclusive mode access.

The default when you install a driver into Windows 10 in most cases is a shared mode. This is what one would want when one is connecting to an audio device to get sound out of the PC (system sounds, various application sounds, content played by applications, etc). Since all of these can be happening in parallel, Windows has a built in mixer that allows all these different sources to come in and mixes them and sends them out based on the capabilities advertised by the sound device. You can manually select the input parameters in that list so that all sources connected to the Windows mixer via shared mode are resampled to that selection (you can also have for example, Dolby Live as one of the choices there if the driver supports it to on-the-fly convert incoming multi-channel sound via S/PDIF to an optical port for example). The DAC sees the output resolution sent by Windows mixer which is typically the selection made in your list.

The above is not meant for bit perfect audio reproduction or recording or for low latency applications.

Windows has a direct mode where applications can bypass the Windows mixer and directly send content in the format that is supported by the connected destination. This allows, for example, an application like foobar 2000 or JRiver to query for supported formats of the destination. This is listed in a different tab called supported formats not in the Advanced tab you have in the picture. Then based on content, these applications can either resample or send bit perfect at a supported resolution or rate without the Windows mixer coming in the way. The DAC sees what the application is sending in this mode.

The downside to this is that since there is no mixer in the middle, only one content source can be using it at any time and all other sounds including Windows system sounds will not be able to be heard when one application has requested and using the Direct Mode which is an exclusive mode for the reason above.

But for this to happen, you need to check allow exclusive mode in the settings below the list you have pictured and give such exclusive use priority if you don’t want to be interrupted during the use of that exclusive use.

In addition, the application must be able to use direct mode - not all applications do. In particular, the Amazon music app does not seem to be able to do Direct Mode, so it just uses the shared mode with the setting you have selected in that list with the music going through the Windows mixer. The mixer will resample to the selected resolution in that list. So the DAC will see whatever is selected there.

Both of the above systems depend on the Windows OS providing an abstraction of an audio device with a speaker configuration, etc.

There is also a hardware direct mode where a driver may allow direct interfacing with the hardware bypassing even the above abstraction or the exclusive mode. This is what ASIO was developed for. To windows this looks just like some data going to a device on a bus and no concept of what that data is let alone audio. This requires the application using it to interact with that hardware driver and provide the configuration settings in its interface along with any mixing or mapping of channels available in the output device to speaker channels if required, etc. This is what DAWs or professional recording or playback applications do. A specialized card or device may provide software drivers for both an ASIO access to the device as well as set up a virtual audio device to make it available through the Windows audio systems for applications that want a playback or recording device abstraction in direct or shared mode. Good content players may also support this hardware direct mode for playback. Nothing in the Windows audio device manager settings is relevant to this hardware direct use.

Hope that helps.
Audimus, this is quite helpful. Many thanks. A few questions, if you don't mind:

- The TEAC DAC provided an ASIO driver for Windows, which I have installed. In simple terms, does this mean that if I am using the TEAC software, which uses these drivers, it is bypassing the Windows mixer and handling the data itself? This is what I use for files I have on my PC, and the DAC seems to indicate it is recognizing the correct format and sample rate.

- With regard to the Amazon player, exclusive mode would only apply if the application recognizes direct mode, and the consensus is that the Amazon software uses shared mode? So in this case, the DAC will see whatever is selected in the Windows properties; i.e.: I would need to change that manually based on the input format, since Amazon's software is likely not automatically changing it, for example when the source changes from CD to HD quality? (BTW, the "exclusive mode" selection is now on the Advanced tab in Windows 10 (see below)).

Windows sound.png


Thanks again!
 
Top Bottom