Simply process all the samples in the sound buffer.
A simple, basic way would be to divide by 16 (4 bits) and then multiply by 16 again. This works if you work with only integers; if not, you need to round them between the divide and multiplication.
Note that this is a permanent change. If you need both, make a copy.