public void LeftChannelOnly()
 {
     IWaveProvider monoStream = new TestMonoProvider();
     MonoToStereoProvider16 stereo = new MonoToStereoProvider16(monoStream);
     stereo.LeftVolume = 1.0f;
     stereo.RightVolume = 0.0f;
     int samples = 1000;
     byte[] buffer = new byte[samples * 2];
     int read = stereo.Read(buffer, 0, buffer.Length);
     Assert.AreEqual(buffer.Length, read, "bytes read");
     WaveBuffer waveBuffer = new WaveBuffer(buffer);
     short expected = 0;
     for (int sample = 0; sample < samples; sample+=2)
     {
         short sampleLeft = waveBuffer.ShortBuffer[sample];
         short sampleRight = waveBuffer.ShortBuffer[sample+1];
         Assert.AreEqual(expected++, sampleLeft, "sample left");
         Assert.AreEqual(0, sampleRight, "sample right");
     }
 }
 public void LeftChannelOnly()
 {
     IWaveProvider monoStream = new TestMonoProvider();
     MonoToStereoProvider16 stereo = new MonoToStereoProvider16(monoStream);
     stereo.LeftVolume = 1.0f;
     stereo.RightVolume = 0.0f;
     int samples = 1000;
     byte[] buffer = new byte[samples * 2];
     int read = stereo.Read(buffer, 0, buffer.Length);
     Assert.AreEqual(buffer.Length, read, "bytes read");
     WaveBuffer waveBuffer = new WaveBuffer(buffer);
     short expected = 0;
     for (int sample = 0; sample < samples; sample+=2)
     {
         short sampleLeft = waveBuffer.ShortBuffer[sample];
         short sampleRight = waveBuffer.ShortBuffer[sample+1];
         Assert.AreEqual(expected++, sampleLeft, "sample left");
         Assert.AreEqual(0, sampleRight, "sample right");
     }
 }