Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Play same file multiple times using WaveOutEvent

$
0
0
Hello sir,
I tried using AudioFileReader in the way that you suggested and it is working as you said. That means re-positioning to the start should work for me.

So I was trying to find out what is going wrong and I found that when you call Play for the second time, the PlaybackThread waits infinitely at callbackEvent.WaitOne() call. Now this might be because when 1st PlaybackThread completes reading all the buffers and exits, callbackEvent must be remaining in non signaled state. Is it the case? and if yes then Should we call callbackEvent.Set() before exiting from the PlaybackThread?

I have one more doubt, how come callbackEvent.WaitOne() is returning immediately for the first time? (I have this doubt because you have initialized callbackEvent with initial state as non signaled!)

Viewing all articles
Browse latest Browse all 5831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>