• 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). There are daily reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Which DACs will play and display the correct bit rate and frequency of non resampled 320 CBR files?

Vincent Kars

Addicted to Fun and Learning
Technical Expert
Joined
Mar 1, 2016
Messages
608
Likes
1,106
there are tools that can detect that sort of fakery, like "Lossless Audio Checker"
It doesn't
 

Katji

Major Contributor
Joined
Sep 26, 2017
Messages
3,002
Likes
2,212
[i suppose someone said this but] really, the point of those tests/comparisons is to test whether the person/s can tell whether it is MP3 320 kbps or WAV or ALAC or whatever.
 
F

freemansteve

Guest
It doesn't

Well I've tried it on a few things I have faked-up myself, only between FLAC and MP3, not AAC mind, and it spotted those, even when I couldn't really tell. I understand it's far from foolproof though - I have made FLACs from CDs where it (L.A.C.) does think a track or two is upsampled....!
 
Last edited by a moderator:

Katji

Major Contributor
Joined
Sep 26, 2017
Messages
3,002
Likes
2,212
If you have a play with something like Audacity, you can do all sorts of pointless things to fool people (or DAC) that say, what was a 256kbs MP3 is now a 24/96 FLAC, but there are tools that can detect that sort of fakery, like "Lossless Audio Checker" and so on....
I ran Fakin Da Funk last night, on a particular folder, that i've added a lot of files to since the last time i did it...and realised why WAV is better than flac - if i'm getting it from bandcamp or something. Because i was reminded that this one file i put there, free flac from Bandcamp turned out to be a 192 kbps mp3. Unusual case. One track i liked, in a mix...weekly mixes that have download enabled on Soundcloud, 320 kbps via Apple LogicPro.
I'm used to some of these DJs thinking they can convert 160 to 320 and so on, but this was a surprise.

1650647363677.png
 

staticV3

Major Contributor
Joined
Aug 29, 2019
Messages
1,681
Likes
2,379
How would downloading the track as WAV have prevented that?
Can't you do 192Kbps MP3->FLAC just as easily as 192Kbps MP3->WAV?
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
An obvious first is studying computer audio file formats.
Lets assume we are ripping a CD.
A CD contains 2 channel PCM audio with sample of 16 bit and a sample rate of 44.1 kHz.
We can rip to lossless formats like WAV or AIFF.
We can also rip to a lossless compressed format like FLAC, ALAC, etc.
This saves space but you still have large file sizes.
As in the 90’s HD was very expensive, they invented lossy compression and MP3 is the mother of lossy compression. You throw out information, all that is masked first, then you start to roll of the treble, Huffman encoding, etc.
Obvious, what you throw out is lost forever.

https://www.thewelltemperedcomputer.com/Intro/SQ/audio_formats.html



What happens on playback?
If you look at the back of a DAC you probably see inputs like Toslink (SPDIF over optical), coax (SPDIF over electrical), USB and maybe AES/EBU.
What you don’t see is an input for FLAC, an input for 320 VBR, etc. Luckily as there is a plethora of audio file formats out there.
On playback, you choose a file e.g. a 256 VBR MP3. The media player invokes the appropriate codec e.g. LAME and this codec will decode the MP3 into PCM so we have our 16 bit / 44.1 PCM and this will be send to the DAC using one of its protocols.

What happens if you have different sample rates?

If you do nothing, all files will be played at the rate as set in de audio panel.
If you want automatic sample rate switching, you need a driver bypassing the audio stack of the OS.
In Win this is WASAPI/Exclusive, on a Mac it is hog mode, on Linux it is probably using hw or plughw in ALSA but my Linux knowledge is a bit feeble.

So if your DAC don’t switch it is very likely not a problem with the DAC but with the system configuration.
Hello Vincent.
Thanks for taking the time to post. I must admit, I haven't visited your site for quite a few years.
It used to be ASIO4all for windows based machines. I expect windows has finally brought in some other way of bypassing the audio stack by now. ASIO4all did work in most cases but it was a wrap rather than a proper driver.
As you doubtless know Pulse has been the Linux audio manager for years now. A few distros came without pulse, one example would be Lubuntu and of course all the various implementations of MPD. Pulse was not appreciated by Linux audio enthusiasts. It always seemed to get in the way and many people went about trying to remove it from their computers. It has a horrible habit of breaking things on it's way out the door.
It is much improved now while to get ALSA to behave still requires dependencies that may not be shiped with the original distro and often requires getting into the terminal to make it do what you want it to.

Where I've gone wrong is not understanding enough about the difference between a straight dac and a streamer.
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
Regarding decompression algorithms.
From what little I can recall of sampling theory and both compression and decompression algorithms, they are never "exact". They are always an approximation between values. In the case of digital audio those values are one and zero. There can be errors.
I've had a quick look in some old papers but I can't find exactly what I want.
If I'm right and it is always an approximation between one and zero; the algorithm has to choose one or zero. I believe there is some quite complex statistics to do with making sure the algorithm picks the correct value.
There is indeed a lot of math out there.
Perhaps someone who has a better grasp of the subject might explain it in simple terms.
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
I think what I shall do is convert all my mp3 files to redbook. The harsh reality is these days I just cannot be arsed with the messng about with audio related problems. I want to press play and have sound come out of my speakers; preferable the sound from the track I had chosen at the correct bit depth and frequency. The few so called Hi Res files I have will play as long as I remember to click twice which seems to work.
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
11,958
Likes
13,560
Location
Riverview FL
From what little I can recall of sampling theory and both compression and decompression algorithms, they are never "exact".

FLAC is "exact", just as ZIP is "exact", as is any other "lossless" compression scheme.

They encode the data in the file to occupy a smaller file size, and return the original data upon decompression.

What you put in them you get back.

Don't ask me how, that's beyond my paygrade.
 

threni

Addicted to Fun and Learning
Joined
Oct 18, 2019
Messages
978
Likes
1,056
Location
/dev/null
I think what I shall do is convert all my mp3 files to redbook. The harsh reality is these days I just cannot be arsed with the messng about with audio related problems. I want to press play and have sound come out of my speakers; preferable the sound from the track I had chosen at the correct bit depth and frequency. The few so called Hi Res files I have will play as long as I remember to click twice which seems to work.
Converting mp3 files to "redbook" (44.1 kHz flac/wav files?) won't solve any problems. You'll just waste a lot of time and disk space and end up with something which sounds identical. It won't make it any easier for you to understand the numbers on the front of your DAC.
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
Feel free - that's how digital compression works. Reversible encoding and non-reversible encoding. Lotta math out there.



No, it is not possible. MP3 encoding irrevocably removes information. Resampling back up to 44.1 at a later point can't add that information back in, because the thing doing the resampling doesn't know about it. It's been marked as "44.1" and will play back as that PCM format, but the data within is the same.

Think JPEG. If you take a picture of something as an 80x80 pixel JPEG , then blow it up to 1000x1000, blowing it up doesn't magically reintroduce detail or data that wasn't there to begin with.


(unless you use math and ML models to "guess" at what should have been there and reinsert it, as a lot of cool image enhancement tech does nowadays - DACs and audio codecs and PCM resampling most definitely do not do that, however)
Thanks. I understand about discarded samples and interpolation for both audio and video.
I just want the dac to report on the display (It's the main reason I bought the Topping D10s, it has a screen on which the frequency is displayed. If it doesn't know, then rather than display possibly what it played last if that's what it does it should imo display some nulloutput notice or similar.
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
Converting mp3 files to "redbook" (44.1 kHz flac/wav files?) won't solve any problems. You'll just waste a lot of time and disk space and end up with something which sounds identical. It won't make it any easier for you to understand the numbers on the front of your DAC.
I have very few mp3s. I'm going to try one. I've got a decent choice of conversion software.
Sounding identical is what I'm after and for the number of mp3 files I have, disc space isn't an issue.
 

threni

Addicted to Fun and Learning
Joined
Oct 18, 2019
Messages
978
Likes
1,056
Location
/dev/null
Regarding decompression algorithms.
From what little I can recall of sampling theory and both compression and decompression algorithms, they are never "exact". They are always an approximation between values. In the case of digital audio those values are one and zero. There can be errors.
I've had a quick look in some old papers but I can't find exactly what I want.
If I'm right and it is always an approximation between one and zero; the algorithm has to choose one or zero. I believe there is some quite complex statistics to do with making sure the algorithm picks the correct value.
There is indeed a lot of math out there.
Perhaps someone who has a better grasp of the subject might explain it in simple terms.
If you re-read Nyquist you'll see that if you sample at a high enough rate you will exactly capture the input. In this case, 44.1kHz is enough to capture 22.05 kHz which is way above what most humans can hear. If you then use a lossless compression system such as flac you'll not lose any data in the file that audio will be contained in when it's asleep, and when you wake it up to play it it'll sound just like the data as it was when it was captured. There's no problem with numbers between one and zero...not sure what you're getting at but each sample is 16 bits so each number can be between 0 and 65535 and the difference between and two adjacent numbers is pretty small so if you wanted 14023.5 you could pick 14023 or 14024 and it's not going to make much difference.
 
F

freemansteve

Guest
Regarding decompression algorithms.
From what little I can recall of sampling theory and both compression and decompression algorithms, they are never "exact". They are always an approximation between values. In the case of digital audio those values are one and zero. There can be errors.
I've had a quick look in some old papers but I can't find exactly what I want.
If I'm right and it is always an approximation between one and zero; the algorithm has to choose one or zero. I believe there is some quite complex statistics to do with making sure the algorithm picks the correct value.
There is indeed a lot of math out there.
Perhaps someone who has a better grasp of the subject might explain it in simple terms.
Hold on, it all depends on whether you are are thinking about lossless or lossy compression! The giveaway is in the name.
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
If you have a play with something like Audacity, you can do all sorts of pointless things to fool people (or DAC) that say, what was a 256kbs MP3 is now a 24/96 FLAC, but there are tools that can detect that sort of fakery, like "Lossless Audio Checker" and so on....
Yep, Audacity is a nice tool. It's showing its age a bit now and it doesn't win any user friendly awards but it's a powerful tool if you know how to use it to it's full potential, which I don't.
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
Hold on, it all depends on whether you are are thinking about lossless or lossy compression! The giveaway is in the name.
I believe even in lossless the algorithms still make errors. If this is true then by definition the process is not exact.
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
Anyway. I'm not positive about much of what I've written about decompression and it isn't really dealing with the question I asked.
It would seem, now I understand better the difference between a dac and a streamer that the question is answered and the answer is no. I don't really need to know the details of why.
 

threni

Addicted to Fun and Learning
Joined
Oct 18, 2019
Messages
978
Likes
1,056
Location
/dev/null
Thanks. I understand about discarded samples and interpolation for both audio and video.
I just want the dac to report on the display (It's the main reason I bought the Topping D10s, it has a screen on which the frequency is displayed. If it doesn't know, then rather than display possibly what it played last if that's what it does it should imo display some nulloutput notice or similar.
Suppose you were playing a hires audio file, then you watched a youtube video but left the audio file playing in the background. Your computer will take the 24/192 audio file and combine it with the 16/44 youtube video and send it to the DAC. Which frequency would you expect to see on your DAC display? Would it pick one at random? The highest one? The loudest? Your computer is going to have to combine both sources into a single bitrate and output that to the DAC, and the DAC is going to have to know this rate and be able to continuously accept the data in that format. There's no reason for the rate you choose to have any connection with the bitrate of the audio you started with. You might have a 192kbps mp3 and a 16/44 cd but choose to feed the dac at 96kHz. I listen exclusively to 16/44 flac files but I feed my DAC at 96kHz because I use EQ and there's a difference - on paper at least - in sound quality if the EQ is performed at this higher rate. But I don't own a single flac file at 96kHz and if I ever obtained any I'd resample it down to 16/44 as it would sound the same but take up less space.
 
OP
S

Shadrach1

Member
Joined
Apr 14, 2022
Messages
24
Likes
25
Suppose you were playing a hires audio file, then you watched a youtube video but left the audio file playing in the background. Your computer will take the 24/192 audio file and combine it with the 16/44 youtube video and send it to the DAC.
I think this is why audio drivers have audio managing programs. They ensure this doesn't happen. With Deadbeef there used to be an option to tell ALSA to release the plugin resonsible for the audio playing on the music player and transfer the management to whatever plugin in, or core that managed combined video and audio for example. It used to be audio at 16/48 from what I recall.
I'm fairly certain that a sound manager doesn't try to combine the bit depths and frequencies.

I also play my music files at 16/44 and like yourself I imagine, resampled some 24/96 files down to 16/44 in an attempt to take an advantage of the extra few bits. I couldn't detect a difference.
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
11,958
Likes
13,560
Location
Riverview FL
I believe even in lossless the algorithms still make errors. If this is true then by definition the process is not exact.

What you believe doesn't change the facts.

Lossless compression gives back the original data when decompressed.

Example: the text above.

It was likely losslessly compressed in the network when sent to Amir's server, likely losslessly compressed in storage there, losslessly compressed when sent back to me (and you) to view, and decompressed before you (and I) see it again.

I don't see any errors.

Fact 'o'life.

 
Last edited:
Top Bottom