Converts an int x of bit width bits to an audio sample in the range -1, 1.
x
bits
-1, 1
double intToSample(int x, int bits) => (x / _readScale(bits)) - 1;