By multiplying each sample value by 2. Simple as that.
Your digital audio is nothing but a stream of usually 44,100 or 48,000 loudness values per second. You can just multiply them by 2 and use the max/min value of your scale as boundaries (usually you wouldn’t hit them, because if it were loud enough, you wouldn’t turn the audio past 100%, but in the case a value would exceed a boundary, you get some nice clipping )
2 comments
[ 3.2 ms ] story [ 18.9 ms ] thread