Accord.DirectSound.AudioOutputDevice.WaitForStop C# (CSharp) Method

WaitForStop() public method

Wait for audio output has stopped.
Waits for output stopping after it was signaled to stop using SignalToStop method.
public WaitForStop ( ) : void
return void
        public void WaitForStop()
        {
            if (thread != null)
            {
                for (int i = 0; i < notifications.Length; i++)
                    (notifications[i].WaitHandle as AutoResetEvent).Set();

                // wait for thread stop
                thread.Join();

                thread = null;
            }
        }