Jump to content
IGNORED

WASAPI and bit depth question


Recommended Posts

Hi,

 

in foobar2000 I have two options for output:

 

- WASAPI: I cannot choose the frequency rate , I can choose the bit depth

 

- ASIO: I cannot choose the frequency rate, I cannot choose the bit depth

 

So, if a file is natively is 16 bit /44 khz, and in my output settings I have 24 bit as depth, the player (foobar or else) will resample occuring a not bit-perfect streaming?

 

Other example, the "exclusive mode" in Tidal app is ON, and my OS Windows 10 mixer is set as 24 bit, the Tidal song is 16 bit, there will be a resample ruin the "exclusive"?

TV: Philips 55PUS7502-12 / Hi-Fi: Roksan K3 - miniDSP DDRC-24 - Elac Debut Reference DBR62 - Moon Audio Silver Dragon USB - AudioQuest Sydney RCA - Ricable Ultimate Speaker - Dirac Live 3 / Headphones: Chord Mojo - Dan Clark Audio AEON Flow Open / Source: Raspberry 4 Pi - Roon - RoPieeeXL / Gaming: Xbox One X / Tablet: iPad Pro 10.5
Link to comment

When you go from 16-bit to 24-bit (or 32-bit) by zero-padding, the result is still considered bit-perfect.

 

I don't know why foobar wouldn't allow selecting sampling rate with WASAPI, it is possible with both WASAPI (exclusive mode) and ASIO. It is correct that you cannot choose sample format (bit depth) with ASIO, because ASIO demands application to deliver samples in the format hardware supports, so application needs to adapt to the hardware and not vice versa.

 

With exclusive mode, the windows mixer setting shouldn't have any effect (with some drivers it may still have due to bugs).

 

So no, you are not ruining anything if the bit depth is increased.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
4 hours ago, Miska said:

When you go from 16-bit to 24-bit (or 32-bit) by zero-padding, the result is still considered bit-perfect.

 

In the digital domain it is bit perfect. But for DAC distortions it may be matter.

Because DAC may be buit by cascade scheme (group bits feed separate sigma delta modulators). As rule, it is fairly for any PCM DAC.


So sound may depend on zero-padding size. Though it is very subtle difference.

AuI ConverteR 48x44 - HD audio converter/optimizer for DAC of high resolution files

ISO, DSF, DFF (1-bit/D64/128/256/512/1024), wav, flac, aiff, alac,  safe CD ripper to PCM/DSF,

Seamless Album Conversion, AIFF, WAV, FLAC, DSF metadata editor, Mac & Windows
Offline conversion save energy and nature

Link to comment
6 hours ago, audiventory said:

 

In the digital domain it is bit perfect. But for DAC distortions it may be matter.

Because DAC may be buit by cascade scheme (group bits feed separate sigma delta modulators). As rule, it is fairly for any PCM DAC.


So sound may depend on zero-padding size. Though it is very subtle difference.

 

No it won't. The internal DSP pipeline on delta-sigma DAC chips is 24- or 32-bit, so if you input 16-bit it is zeropadded the same. In addition for PCM inputs you have digital filters first (unless you go at 352.8/384k input rates) that will produce 24/32-bit output before feeding the modulator. XMOS USB interfaces use 32-bit sample format anyway. Some others use 24-bit. There are only few that even allow sending 16-bit data over USB. S/PDIF is always 24-bit (24 bits of audio data and 8 bits of aux data).

 

If you can prove me wrong with measurement results, I'm happy to try to reproduce those. I have two different audio analyzers and pile of DACs for that purpose. I do a lot of DAC output measurements as part of my DSP development process.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment

On WASAPI exclusive playback, device bit depth is not important when source PCM bit depth is 16bit.

 

On WASAPI shared playback, when shared mode device bit depth is set to 16bit, TPDF dither is added somewhere in the Windows audio engine and LSB information is lost. When shared mode device bit depth is set to 24bit or 32bit, the TPDF dither is not added. Therefore if 16bit music is played using WASAPI shared mode, it is better to set shared mode device bit depth to 24bit or 32bit rather than 16bit.

 

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment

The 24 (or 32) bit output setting will result in bit-perfect output for 16bit files as well, otherwise one would have to change the setting each time when flipping between 16 and 24bit files.

 

This is confirmed by some DAC manufacturers' setup instructions, such as Ayre:

 

Quote

These settings will avoid any undesired signal processing that might degrade the delivery of bit-perfect data to the Ayre USB D/A converter. 

Next if using Windows Vista/7, select "Playback - Output". Choose "WASAPI : Speakers (2- Ayre USB Interface)" for "Device:". In the "Output Format" section, select "24-bit" from the dropdown list under "Output data format:".

https://www.ayre.com/usb-dac-windows-playback.htm#Foobar

Claude

Link to comment
18 hours ago, Miska said:

 

 S/PDIF is always 24-bit (24 bits of audio data and 8 bits of aux data).

 

20bits of audio sample and 4bits of aux sample.

 

S/PDIF sends bit depth (word length) using channel status word. I checked RME Fireface 400 S/PDIF output and found word length == 24 even when playing audio with 16bit WASAPI device bit depth !

 

channelStatus.thumb.png.46034e75c246e19971a5263c40a97b2b.png

 

zeropad.thumb.png.3cadf6054e1693b53ad14705df3e9a0f.png

 

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment
19 hours ago, Miska said:

The internal DSP pipeline on delta-sigma DAC chips is 24- or 32-bit, so if you input 16-bit it is zeropadded the same. In addition for PCM inputs you have digital filters first (unless you go at 352.8/384k input rates) that will produce 24/32-bit output before feeding the modulator. XMOS USB interfaces use 32-bit sample format anyway. Some others use 24-bit.

 

On 06.10.2017 at 4:22 AM, audiventory said:

Because DAC may be buit by cascade scheme (group bits feed separate sigma delta modulators). As rule, it is fairly for any PCM DAC.

 

DSP and USB is not matter in context of the discussion. The issue placed in analog part of the DAC.

 

I meant cascade scheme. Me seems, I watched schemes, assembled from several sigma-delta modulators. But now I can't found example and, possibly, I mistaken in my post.

 

May be "multi level sigma-delta modulator" more correct term, than "cascase"?

 

In this case shifted 16 bit signal may don't touch lower levels of the modulator (DAC's cascades that generate the levels). I can suppose, that each level have own error.

 

Thus total error may be different if different level kits (all or upper only) are used.

Of course result depend on number output bits of the modulator.

 

I just looked for block diagrams of modern DAC chips. Looks like, there used single sigma-delta modulator per all bits (for block diagrams that I found). But I don't know exactly multilevel or not sigma-delta modulator there.

 

Unfortunatelly, measurements of pair / ten DAC show us how work these 2 / 10 items. It cannot be used as claim base for all cases. It is need to know exactly that inside DAC device and DAC chip for correct result interpretation.

 

 

 

AuI ConverteR 48x44 - HD audio converter/optimizer for DAC of high resolution files

ISO, DSF, DFF (1-bit/D64/128/256/512/1024), wav, flac, aiff, alac,  safe CD ripper to PCM/DSF,

Seamless Album Conversion, AIFF, WAV, FLAC, DSF metadata editor, Mac & Windows
Offline conversion save energy and nature

Link to comment
On 10/7/2017 at 5:33 AM, yamamoto2002 said:

S/PDIF sends bit depth (word length) using channel status word. I checked RME Fireface 400 S/PDIF output and found word length == 24 even when playing audio with 16bit WASAPI device bit depth !

 

channelStatus.thumb.png.46034e75c246e19971a5263c40a97b2b.png

 

zeropad.thumb.png.3cadf6054e1693b53ad14705df3e9a0f.png

 

 

Yeah, commonly lot of the extra information is ignored by either end of S/PDIF link (or AES/EBU which has somewhat different meanings for some of the same bits). With I2S it becomes irrelevant anyway. With some of the older interfaces used with R2R ladders before I2S the information needed to be set correctly between digital filter chip and DAC chip so that the digital filter knew what bit depth to send to the R2R ladder. This didn't have impact on the input side.

 

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
On 10/7/2017 at 8:14 AM, audiventory said:

May be "multi level sigma-delta modulator" more correct term, than "cascase"?

 

In this case shifted 16 bit signal may don't touch lower levels of the modulator (DAC's cascades that generate the levels). I can suppose, that each level have own error.

 

Since those have at most 65-levels equivalent of 6-bits in two's complement it doesn't make sense in this scope.

 

But again, since there's a digital filter before the modulator that outputs 24/32-bit samples anyway, it doesn't matter. You wouldn't want to dither or truncate these interpolated samples back to 16-bit because it would partially make the process useless. The interpolation (digital filter) stage will produce information in the LSBs too, even if the original samples were just 16-bit.

 

On 10/7/2017 at 8:14 AM, audiventory said:

DSP and USB is not matter in context of the discussion.

 

It matters because the information about original word length is lost at USB interface level and latest at I2S level. So the DAC chip won't know...

Signalyst - Developer of HQPlayer

Pulse & Fidelity - Software Defined Amplifiers

Link to comment
1 hour ago, Miska said:

Since those have at most 65-levels equivalent of 6-bits in two's complement it doesn't make sense in this scope.

 

If I understand correctly, each bit have own reference voltage. Error of the voltage can cause non-linear distortions.

AuI ConverteR 48x44 - HD audio converter/optimizer for DAC of high resolution files

ISO, DSF, DFF (1-bit/D64/128/256/512/1024), wav, flac, aiff, alac,  safe CD ripper to PCM/DSF,

Seamless Album Conversion, AIFF, WAV, FLAC, DSF metadata editor, Mac & Windows
Offline conversion save energy and nature

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...