Brent Brown wrote: > > Back to the subject, to digitally amplify a .wav file you would need > to do something like this for each 8 bit sample: > - Remove the offset by subtracting 7Fh for data above 7Fh or > subtracting from 7Fh for data below 7Fh > - Multiply by your amplification factor > - Put the offset back in by adding 7Fh or subtracting from 7Fh as > necessary > - Store it or play it > > You are limited to what you can do in an 8 bit file before clipping. > Using 16 bit intermediate maths helps by letting you do stuff like > this: for 10% increase in volume, multiply by 11 then divide by 10. > > Brent Brown Sound isn't linear, as perceived by the human ear, though; We hear sort of Logarithmically. And you need to consider, what happens if you hit overflow?, and handle that Really good books on Audio Accoustics are out there; The average human ear perceives a doubling in volume when the power has been increased by 10db, i.e. twice the actual power - so basically for a 10% increase in *perceived* volume, you want to increase a signal's voltage by 10 TIMES. So for a 10% increase in volume, I'd guess you actually want to increase voltage by about 3.548 times? (It's been a while since I did audio engineering, and all my books are in storage due to the move. I like Digital lots more ) So I'm possibly wrong here. Mark