Let me try to explain in more simple terms. If you don't understand something, please ask rather than just ignoring it. It is extremely disheartening to think progress is being made (after spending considerable time explaining a concept) when you say "I found another code. I'm throwing the other one away."
The last program you posted is to read battery voltage. The ADC reading is scaled to read the
linear voltage. Look at and understand the chart below. An ADC of 0 = zero volts. An ADC reading of about 200 = 1 volt. 400 = 2 volts. On up to 5 volts. It's
linear. A change of ADC reading by 200 counts = 1 volt.
Sound pressure and the perception of noise level by the ear
are not linear. The noise level has to change by about 3.15 times to sound twice as loud. And 3.15 times again to sound 4 times as loud. The perceived noise level is a multiple, not a linear relationship. Look at the chart below.
Let's say a screaming loud commercial comes on. You want to cut the level in half. You'd need to cut the level down to 315 ADC counts - from 1000 to 315 is a change of 685 counts. Want to cut the volume in half again? That requires cutting the ADC counts to 100, a change of 215 counts. 685 counts to decrease the volume by half at high levels; 215 at low levels. It's not LINEAR.
The increments get eve smaller at low levels.
Explained as well as I am able.