title: Convert 16 bit pcm to 8 bit
body: <p>I have pcm audio stored in a byte array. It is 16 bits per sample. I want to make it 8 bit per sample audio.  </p>
  
  <p>Can anyone suggest a good algorithm to do that?</p>
  
  <p>I haven't mentioned the bitrate because I think it isn't important for the algorithm - right?</p>