title: Convert Mp3 to WAV with naudio without writing on disk. (Stream only)
body: <p>I want to convert mp3 files to WAV. In DirectX.DirectSound the secondary buffer is supporting only WAV. I am converting the files using naudio and this is working fine. </p>
  
  <pre><code>using (Mp3FileReader reader = new Mp3FileReader(mp3File))
  {
      WaveFileWriter.CreateWaveFile(outputFile, reader);
  }
  </code></pre>
  
  <p>The problem is that I can't save the files on disk so I have to use them with stream.</p>
  
  <pre><code> Mp3FileReader mp3reader = new Mp3FileReader(filenamePathMp3);
   var stream=WaveFormatConversionStream.CreatePcmStream(mp3reader);
  </code></pre>
  
  <p>which throws an exception Value does not fall within the expected range. How Can I make a stream with the audio converted to WAV or Raw audio for the secondaryBuffer without writing on disk?</p>
  
  <p>Thank you in advance,</p>