https://hydrogenaud.io/index.php?topic=122263.msg1009279#msg1009279
Real world example that oldsCool shows the HDCD files posted by @koawmfot only used 17 bits while SoX and Audition showed something else. It is recommended to save the files as flac or 7zip as they are smaller and have built-in error check so that we know the downloaded files are not corrupted.
SoX
Input File : 'E:\download\SW Decode - ffmpeg.wav'
Channels : 2
Sample Rate : 44100
Precision : 24-bit
Duration : 00:00:15.00 = 661500 samples = 1125 CDDA sectors
File Size : 3.97M
Bit Rate : 2.12M
Sample Encoding: 24-bit Signed Integer PCM
In:100% 00:00:15.00 [00:00:00.00] Out:662k [ =====|=====-] Clip:0
Overall Left Right
DC offset 0.000009 0.000009 -0.000004
Min level -0.603907 -0.495191 -0.603907
Max level 0.536741 0.536741 0.481397
Pk lev dB -4.38 -5.40 -4.38
RMS lev dB -21.43 -21.23 -21.64
RMS Pk dB -16.77 -16.77 -18.34
RMS Tr dB -29.31 -29.20 -29.31
Crest factor - 6.19 7.29
Flat factor 0.00 0.00 0.00
Pk count 2 2 2
Bit-depth 24/24 23/24 24/24
Num samples 662k
Length s 15.000
Scale max 1.000000
Window s 0.050
Done.
Input File : 'E:\download\SW Decode - CUETools.wav'
Channels : 2
Sample Rate : 44100
Precision : 24-bit
Duration : 00:00:15.00 = 661500 samples = 1125 CDDA sectors
File Size : 3.97M
Bit Rate : 2.12M
Sample Encoding: 24-bit Signed Integer PCM
In:100% 00:00:15.00 [00:00:00.00] Out:662k [ =====|=====-] Clip:0
Overall Left Right
DC offset 0.000009 0.000009 -0.000004
Min level -0.603907 -0.495192 -0.603907
Max level 0.536739 0.536739 0.481396
Pk lev dB -4.38 -5.40 -4.38
RMS lev dB -21.43 -21.23 -21.64
RMS Pk dB -16.77 -16.77 -18.34
RMS Tr dB -29.31 -29.20 -29.31
Crest factor - 6.19 7.29
Flat factor 0.00 0.00 0.00
Pk count 2 2 2
Bit-depth 20/20 19/20 20/20
Num samples 662k
Length s 15.000
Scale max 1.000000
Window s 0.050
Done.
oldsCool
-------------------------------------------------------------------------------
E:\download\SW Decode - ffmpeg.wav
00:00:15 = 1323000 samples / 2-ch @ 44100Hz
24-bit fixed point
Bit Count Percent
0 118 0.008919124
8 199 0.01504157
9 426 0.03219955
10 847 0.06402116
11 1730 0.1307634
12 3303 0.2496599
13 6834 0.5165533
14 13527 1.022449
15 27112 2.049282
16 54488 4.118518
17 107067 8.092744
18 205345 15.52116
19 346154 26.16432
20 382560 28.9161
21 161670 12.21995
22 11612 0.8777022
23 8 0.0006046863
-------------------------------------------------------------------------------
E:\download\SW Decode - CUETools.wav
00:00:15 = 1323000 samples / 2-ch @ 44100Hz
24-bit fixed point
Bit Count Percent
0 118 0.008919124
8 199 0.01504157
9 426 0.03219955
10 847 0.06402116
11 1730 0.1307634
12 3303 0.2496599
13 6834 0.5165533
14 13527 1.022449
15 27112 2.049282
16 54488 4.118518
17 107067 8.092744
18 205345 15.52116
19 346154 26.16432
20 382560 28.9161
21 161670 12.21995
22 11612 0.8777022
23 8 0.0006046863
-------------------------------------------------------------------------------
.WAV file(s) processed: 2
To identify whether a given 32-bit float signal can be fit into 24 bit (or less) integer with no other loss than a volume normalization
I am thinking about adding this check, as well as other things like more advanced wBitsPerSample analysis and such. I upgraded my PC and still don't have Visual Studio and other stuff installed so it may take some time.