Is the operating system playing lossless audio?

0

Considering we have a lossless audio player, and a lossless audio recorder both of which are digital (meaning the audio does not ever go through an analog cable) we should be able to play back the audio file and record it, thus the original and the recording file should be the same bit by bit (excluding metadata).

My question is, is this possible on Windows or Linux? Meaning if I play a song in the browser, and then record it with let's say Stereo Mix (Realtek), What U Hear (Sound Blaster) or WASAPI, then save the recording to a file, then do the same thing once again, will it produce a file that is bit by bit the same as the first one? If not, why?

I have a feeling that this is not the case, at least on Windows. I have noticed a strange behavior, where if I turn the volume up to 100% on Windows, and have no sound playing, I will hear a slight buzz. What I would have expected is, the digital signal going 'till the actual speakers in my headphones, should represent no sound, therefore the headset buzzing unnoticeable (because to my knowledge every speaker beeps at least a little bit), regardless of the volume. Because 0 * anything is 0, therefore amplifying digital audio with nothing in it should stay nothing, while amplifying analog audio with, let's say, 0.0001 in it should make the buzzing a bit louder.

I would like to know the reason why Windows handles audio in this way.

Unleavened

Posted 2019-04-09T12:52:43.397

Reputation: 21

1You're confusing the data path, which will theoretically remain unchanged, with your computer's [probably cheap & cheerful] hardware sound path, which is subject to all kinds of unwanted electrical interference & sub-optimal decoding. I can confirm that your theory works without any audible interference whatsoever.. on a dedicated external sound 'card' & £1500 of studio monitors ;) It will still not produce bit-perfect results unless you take extreme care to not adjust any levels in your transcription, but audibly the result will be almost identical. – Tetsujin – 2019-04-09T13:17:40.327

@Tetsujin Agreed. People often forget that digital signals are sent over analog mediums. This allows for interference and noise. – Keltari – 2019-04-09T16:10:19.243

@Keltari - & this is also why pro systems cost a whole lot more & carry everything over balanced line, at +4dB rather than -10dB ;) – Tetsujin – 2019-04-09T16:54:58.007

Answers

2

So long as you do not involve any analogue audio paths (or bit or sample rate changes) you should, in theory, get a bit-perfect reproduction by simply saving a file with direct audio capture mechanisms as you describe. Within the digital domain, and assuming no conversion stages, there should be nothing to cause data loss.

The problem with the sound coming out of your speakers is that it isn't digital, it is an analogue signal. You are changing to an analogue domain where even the slightest signal noise is your enemy.

In order to output sound to speakers there will be a digital-to-analogue converter (DAC) followed by a variable gain amplifier. These may be implemented in a single monolithic audio chip that handles both input and output audio, but it will have those two basic blocks at the output.

DACs and their cousins the ADC (analogue to digital converter) tend to do well at reproducing the signals, but they have trouble reproducing the tiniest of signals due to power supply noise, noise from nearby devices and so on.

What goes into the DAC, digital audio data, can be bit-perfect but what comes out is subject to the whims of analogue electronics.

What this means is that the signal out of the DAC will have a tiny amount of "ripple" in it which gets fed into the amplifier before going to your speakers.

By turning the volume up all the way you are amplifying the tiny noise from the DAC an extreme amount, and thus you are hearing the noise.

Mokubai

Posted 2019-04-09T12:52:43.397

Reputation: 64 434

Nicely improved from my rather scratchy comment ;) – Tetsujin – 2019-04-09T16:56:51.097

@Tetsujin yeah, I was trying to say that the signal that is "noisy" is outside of his actual data path and has switched over to the land where the slightest changes can make a big difference. – Mokubai – 2019-04-09T18:00:57.747

Thanks for your reply. I forgot to mention that I'm turning up the volume in Windows, not on the sliders on the headphones. I thought Windows volume slider is performing the amplification virtually, then sending it to the hardware - is this then false? Another interesting thing I noticed is that if I put my Windows volume under 5, there will be absolutely no sound in my headphones, but I am able to record it with WASAPI. In fact, WASAPI will record it with the same volume regardless. – Unleavened – 2019-04-14T10:16:25.767

Turning the volume up in windows controls the amplifier after the DAC stage I mentioned. At 5 volume in windows you might have the amplification so low it is essentially inaudible, but it will still be there. The reason WASAPI works regardless of volume is because of exactly what I said, you are recording the "software volume" rather than the signal at your output. – Mokubai – 2019-04-14T13:58:33.563