title: NAudio code holds lock on input file
body: <p>My code below holds a lock on the input file preventing me from working with it later:</p>
  
  <pre><code>public static void ToWave_WMF(string source, string destination)
  {
      using (var reader = new MediaFoundationReader(source))
      using (var rateSampler = new MediaFoundationResampler(reader, new WaveFormat(DefaultEncoding.SampleRate, reader.WaveFormat.Channels)))
      using (var channelSampler = new MediaFoundationResampler(rateSampler, new WaveFormat(rateSampler.WaveFormat.SampleRate, DefaultEncoding.Channels)))
      {
          WaveFileWriter.CreateWaveFile(destination, channelSampler);
      }
  }
  
  public static string BuildWavFile(string userFileLocation)
  {
      var sampleList = new List&lt;ISampleProvider&gt;();
      try
      {
          // Add input file
          var waveFile = AudioHelpers.ToWave_WMF(userFileLocation);
          sampleList.Add(new AudioFileReader(waveFile));
  
          WaveFileWriter.CreateWaveFile16(sirenWaveFile, new ConcatenatingSampleProvider(sampleList));
      }
      finally
      {
          foreach (var sample in sampleList)
          {
              ((AudioFileReader)sample).Dispose();
          }
      }
  
      return sirenWaveFile;
  }
  </code></pre>
  
  <p>Am I using resources wrong? Why is this lock being held? If I delete the file after <code>toWave_WMF()</code> there is no issue. If I use <code>sampleList.Add(new AudioFileReader(userFileLocation));</code> I also dont have any issues deleting the userFile.</p>