title: playback pcm audio pieces
body: <p>I'm trying to play PCM audio samples returned in events by another class.
  If I save them in a file and then play it as a stream everythig ia OK. But in realtime playback nothing happens. PlaybackState sets to Stopped.
  Here is the code:</p>
  
  <pre><code>WaveFormat wf = new WaveFormat(8000, 1);
      MemoryStream ms;
      WaveStream blockAlignedStream;
      WaveOut waveOut;
      short[] PCMSamples = new short[320];
  
      void StartPlayback()
      {
          ms = new MemoryStream();
  
          blockAlignedStream = new BlockAlignReductionStream(WaveFormatConversionStream.CreatePcmStream(new NAudio.Wave.RawSourceWaveStream(ms[1], wf)));
  
          waveOut = new WaveOut(WaveCallbackInfo.FunctionCallback());
          waveOut.Init(blockAlignedStream);
          waveOut.Play();
      }
  
      public void PCMStreamEventHandler(byte[] data)
      {
          this.Invoke((MethodInvoker)delegate
          {
              var pos = ms.Position;
              codec.Convert(data, PCMSamples);
              ms.Position = ms.Length;
              byte[] buffer = new byte[PCMSamples.Length * 2];
              Buffer.BlockCopy(PCMSamples, 0, buffer, 0, buffer.Length);
              ms.Write(buffer, 0, buffer.Length);
              ms.Position = pos;
          });
      }
  </code></pre>
  
  <p>Any help on realtime PCM playback would be appreciated.
  Thanks.</p>