Beispiel #1
0
        /// <summary>
        /// Shut down the background thread.
        /// </summary>
        internal override void Shutdown()
        {
            // If the background thread is alive, send it the special
            // empty utterance that will make it shut down gracefully.
            if (speakingThread != null && speakingThread.IsAlive)
            {
                Say(null, null, new Vector3(0, 0, 0), null);
                Thread.Sleep(600);
            }
            speakingThread = null;

            // Shut down the synthesizer.
            syn.Shutdown();
        }