This is really only true when The Audio System represents samples as integers and not floats like CoreAudio does.
This is really only true when The Audio System represents samples as integers and not floats like CoreAudio does.
App->CoreAudio->HWSoundCard->Speakers(or amplifier)
By using floats in the sound API you don't reduce the bit depth on the first step but you still do on the next two steps. Imagine a scenario where you want to set the volume at half the maximum volume. Your two options are:
1) You set the app to 50%. Core Audio handles that as floats but still has to program the hardware to only output half volume, so if the HW itself doesn't take floats the bit depth is halved. And the HW will always have to output half the voltage so the "voltage depth" of the third step is always halved.
2) You set the speakers to 50%. All the pipeline functions at 100% bit/voltage depth all the way to the speakers/amplifier. Only then, at the final amplification stage, does the signal not get boosted to 100% and only to 50%.
How much this affects real world performance beats me...
So if you use a 24-bit DAC, those bits doesn't matter...
So in other words, you are probably saying that reducing the signal loudness is reducing your signal-to-noise ratio and thus your audible dynamic range. However, your noise floor is probably far higher than 0 dB, more like 20-30 dB SPL (if you're lucky!). A normally-loud (that is, non-damaging) music playback will probably be at about 50-80 dB, so your usable dynamic range will be about 30-60 dB, which translates to about ten bits. Most environments will be worse.
0 dB are actually pretty hard to come by. Even well-insulated acoustical measurement chambers only go to about 10 dB. Only several meter of acoustic foam and a solid foundation and a purpose built air conditioning can go down to 0 dB. So, umm, 0 dB is usually a rather useless figure for non-scientific purposes.
It's worth noting that perceptually, half the volume is actually closer to 3dB (a halving of energy), which is only half a bit of loss.
If a floating point audio pipeline correctly dithers the signal going into the DAC it's unlikely anybody will notice any quality loss by using a digital volume control (even at 16-bit). You might hear the hiss of the dithering if you turn up the analogue portion of the chain, although you'd have to turn it up quite a lot.
This is perfectly sensible, since our sense of hearing does not scale linearly from silent to loud. Our ears have a dynamic range of about 120 dB. On a linear scale, the 50% value would correspond to about -6 dB, which is perceptually one 50th of the full audible scale.
A sensible volume slider (on a PC) would range about 40-60 dB, since anything below -60 dB will be lost in background noise anyway. Thus, the 50% mark would be somewhere around -20--30 dB. Thus, this 50% setting would lose roughly 5 bits of information, not one.
Note however that a reduced dynamic range at "half loudness" is usually just fine, since the full dynamic range can only be heard at high volume anyway.
(Also note that the bottom value of volume sliders usually mutes. Analogue equipment sometimes does not do that, which results in very faint signal playing even when turned all the way down.)
That said, the whole argument about losing resolution probably does not make sense anyway since the operating system volume sliders attenuate the sound hardware DAC gain instead of actually decreasing digital gain...
We were talking about reducing volume in the App. If the app is using the system volume then the App->CoreAudio step is irrelevant (as nothing changes), the CoreAudio->DAC step doesn't change either (full bit-depth and an OOB message to lower the gain), but the DAC->Speakers analog step still has to output half the volume and thus reduce the range of the signal. For this not to matter the OS would need to be able to change the gain in the speakers instead of the DAC.
Again, how much this actually has an audible effect on quality beats me...
I know professional mixing consoles are not (at least not exclusively), but they offset that by calculating everything in 32 bit float and using very high bit length DACs. Sound cards do have a pre-amp stage but I don't know if they are software-controlled.
That's fine but what I was referring to was that after the digital-analog-conversion and the pre-amp now the analog signal that goes out of the audio jack to the speakers has been reduced in range, so on that final path to the speakers you've lost some range.
Audio recordings typically do not go beyond 16 bits of dynamic range after mastering. And even before that, microphones can't deliver more than 20. Neither can ears. So that part of the system won't likely be a problem.
Reducing the signal gain in the analogue domain does not decrease its dynamic range, it merely shifts it to a lower range of the same width. Of course, this will only be true in the operating range of the op-amps, but that is typically not a limiting factor.
After the DACs, the signal will likely go through another pre-amp, then main amp in the sound system, then some analogue filters, then loudspeakers. All these are analogue and not usually limiting the dynamic range (though they will add some distortion). Finally, the signal will enter a room with noise aplenty, which will limit the effective dynamic range of the signal significantly. But that is out of control of that volume slider we talked about in the beginning ;-)
Of course analog signals have an effective limited range. As you yourself mention the noise floor makes sure of that. Only an idealized analog signal of infinite precision doesn't have a limited range.
After the DACs, the signal will likely go through another pre-amp, then main amp in the sound system, then some analogue filters, then loudspeakers. All these are analogue and not usually limiting the dynamic range (though they will add some distortion).
Precisely. So that's why keeping the signal at as high a level as possible without clipping all the way through the pipeline and only limiting at the end is an advantage. All those stages have their own noise floor. Several other people have mentioned on the thread that this is also the general recommendation for audio work.
Finally, the signal will enter a room with noise aplenty, which will limit the effective dynamic range of the signal significantly. But that is out of control of that volume slider we talked about in the beginning ;-)
That's of course true, and again I admit my ignorance as to how much of a difference this really makes once it gets where it matters, your ears. Originally I was just responding to the idea that using floats in your audio framework eliminated all sources of reduction in precision.
My main point still stands that at half the amplitude or half the energy (perceptually half the volume) you're only losing half a bit to a bit of resolution. And even at -20 - -30dB, with 4-5 bits of resolution loss, you're probably not going to notice the degredation.