Why digital volume control degrades audio quality
Bits and dynamic range
Each bit adds approximately 6.02 dB of dynamic range. A 16-bit file has 96 dB theoretical range; 24-bit has 144 dB - more than the ear can resolve in a single moment.
Attenuate digitally by 6 dB and you discard the least significant bit. At -12 dB you lose two bits. At -48 dB you've thrown away 8 bits - taking 16-bit signal down to 8-bit quality. The noise floor rises with every step.
The fix
Use 24-bit or 32-bit OS output and keep the digital volume at 100 %. Control loudness at the analog stage - amplifier knob, preamp, or a DAC with a hardware volume.
With 24-bit OS output you can attenuate digitally by 48 dB and still have 16-bit quality remaining. Many high-end DACs implement volume in the analog domain for exactly this reason. If your DAC has a volume knob, use it.
