title: How to convert pcm samples in byte array as floating point numbers in the range -1.0 to 1.0 and back?
body: <p>The resampling algorithm i use expects <strong>float</strong> array containing input samples in the range <strong>-1.0 to 1.0</strong> . The audio data is <strong>16 bit</strong> PCM  with samplerate <strong>22khz</strong>.</p>
  
  <p>I want to downsample the audio from 22khz to 8khz, how to represent the samples in byte array as floating point numbers <strong>>= -1 and &lt;= 1</strong> and back to byte array?</p>