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

New Post: Using WaveOutEvent to playback in a cycle

$
0
0

Modifying WaveOutEvent.Play() as follows resolved this issue (for me):

        public void Play()       

{           

if (playbackState == PlaybackState.Stopped)           

{               

playbackState = PlaybackState.Playing;

ThreadPool.QueueUserWorkItem((state) => PlaybackThread(), null);

                callbackEvent.Set(); // kicking the thread here can only be good            <=========Line Added========

}

else if (playbackState == PlaybackState.Paused)

{

                Resume();

                callbackEvent.Set(); // give the thread a kick

}

        }

 

So Mark if you agree make it part of the official code.


Viewing all articles
Browse latest Browse all 5831

Trending Articles



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