title: From naudio.Wave.WaveIn to Stream ?
body: <p>I copied this code and i don't understand it but i know what it does when it's finished (output -- sourceStream) ... </p>
  
  <pre><code> NAudio.Wave.WaveIn sourceStream = null;
   NAudio.Wave.DirectSoundOut waveOut = null;
    NAudio.Wave.WaveFileWriter waveWriter = null;
  
          sourceStream = new NAudio.Wave.WaveIn();
      sourceStream.DeviceNumber = 2;
      sourceStream.WaveFormat = new NAudio.Wave.WaveFormat(16000, NAudio.Wave.WaveIn.GetCapabilities(2).Channels);
  
      NAudio.Wave.WaveInProvider waveIn = new NAudio.Wave.WaveInProvider(sourceStream);
  
      waveOut = new NAudio.Wave.DirectSoundOut();
      waveOut.Init(waveIn);
      //sourceStream.DataAvailable.
      sourceStream.StartRecording();
      waveOut.Play();
      sourceStream.StopRecording();
  </code></pre>
  
  <p>What I know that this code records sound from a selected microphone and it gives an output for it (sourceStream) </p>
  
  <p>So the first thing I need is -- > How can i get a stream out from this code (Like instead of WaveIn a Stream [Convert from WaveIn to Stream]) ? </p>
  
  <p>And can you guys please Explain the code ... I tried the NAudio website for the explanation but i didn't understand --> I'm a beginner for audio and Streams... </p>