Quote:
What I believe happens is that attenuation is achieved by truncating the bits one by one, thereby decreasing the volume output. Perhaps someone can reinforce/dispute this claim. |
*Budda-budda-budda* .... *eeeeeoooooooooooooBOOOOM*
One hypothesis shot down in flames, because it's not practical and even if it were the math doesn't work anyway.
The lingua franca of digital audio is linear PCM. It's used for CD audio, WAV, some DVDs, and I'd bet that most compressed audio decoder chips use it as the output format. Since LPCM has a linear relationship between the sample value and output amplitude, and a bit shift on a positive integer is equivalent to division by 2, shifting all samples to the right by one bit is a -6dB drop. That's too coarse to be helpful.
The real problem is negative numbers, used for the "bottom half" of the waveform: in two's complement arithmetic, (which LPCM uses), a bit shift on a negative number makes it a positive number. Worse, a small negative number will become a large positive number and vice versa. Basically you'd trash the data if you did a simple bit-shift.
You could fix this by taking the absolute value of negative samples before shifting them and then negating them afterwards. Or, there may be other arithmetic types where a bit shift is equal to division by 2 for positive and negative numbers. Either way you still havel the -6dB per step weakness.