MPEG-1 Audio Layers I and II

Layer 1
First the numberbits of bits are gotten from the stream based on the number specified in the audio data. These are converted to a fractionalizednumber, which is then converted to a sample number.

$$sample = (2.0^{1.0-scaleindex/3.0})*\frac{2.0^{numberbits}}{2^{numberbits-1}}*\left(fractionalizednumber+2.0^{-numberbits+1}\right)$$