title: Resampling Audio With NAudio
body: <p>I would like to resample a IEEE floating point ISampleProvider at 44100Hz and get another ISampleProvider at 16000Hz, but I can't seem to get NAudio to do the conversion.</p>
  
  <p>This is what I have tried so far.</p>
  
  <pre><code>var myReader = new AudioFileReader(filename);
  var resampledAudio = new WaveToSampleProvider( 
                            new MediaFoundationResampler(
                                 new SampleToWaveProvider(myReader),
                                 new WaveFormat(16000, 2)){ ResamplerQuality = 60 });
  </code></pre>
  
  <p>When I run this code I get an <code>ArgumentException</code> with a message saying:</p>
  
  <blockquote>
    <p>the input argument must already be floating point</p>
  </blockquote>
  
  <p>Does anyone know how I can solve this issue?</p>