title: WaveOut versus WaveOutEvent
body: <p>I'm using <code>NAudio</code> with</p>
  
  <pre><code>WaveOutEvent Klangwiedergabegeraet;
  
  private void Play(string Dateiname)
  {
      Klangwiedergabegeraet = new WaveOutEvent();
      Klangwiedergabegeraet.DeviceNumber = comboBox1.SelectedIndex;
      ISampleProvider StueckchenHalter = null;
      StueckchenHalter = CreateInputStreamS(Dateiname);
      Klangwiedergabegeraet.Init(new SampleToWaveProvider(StueckchenHalter));  
      Klangwiedergabegeraet.Play();
  }
  
  private void Cancel()
  {
      if (Klangwiedergabegeraet != null)
      {
          Klangwiedergabegeraet.Stop();
          Klangwiedergabegeraet.Dispose();
      }
  }
  </code></pre>
  
  <p>When running <code>Cancel()</code>, it won't stop. When I used</p>
  
  <pre><code>WaveOut Klangwiedergabegeraet;
  
  private void Play(string Dateiname)
  {
      Klangwiedergabegeraet = new WaveOut();
      ...
  }
  
  private void Cancel()
  {
      if (Klangwiedergabegeraet != null)
      {
          Klangwiedergabegeraet.Stop();
          Klangwiedergabegeraet.Dispose();
      }
  }
  </code></pre>
  
  <p>It worked. Why is this and what to change?</p>
  
  <p><strong>P.S</strong> I am using <code>WaveOutEvent</code> instead of <code>WaveOut</code> because <code>WaveOut</code> does not have the property <code>DeviceNumber</code>.</p>