# TextToSpeechReset

The TextToSpeechReset call flushes all previously queued text from the text-to-speech system and stops any audio output.

Syntax | MMRESULT TextToSpeechReset | (LPTTS_HANDLE_T phTTS, BOOL bReset)
Parameters | LPTTS_HANDLE_T phTTS | Specifies a text-to-speech handle.
| BOOL bReset | Specifies one of the following Boolean values:
Value | Description
FALSE | Preserves the current mode of the text-to-speech system.
TRUE | The text-to-speech system is returned to the startup state and any open text-to-speech files are closed. The one exception is that this call will NOT resume the text-to-speech system if it has been paused by the TextToSpeechPause call.
Return Value | The TextToSpeechReset call returns a value of type MMRESULT. The return value is zero if the call is successful. The return value is one of the following constants:
Constant | Description
MMSYSERR_NOERROR | Normal successful completion (zero).
MMSYSERR_NOMEM | Unable to allocate memory.
MMSYSERR_ERROR | Unable to flush the system.
MMSYSERR_INVALHANDLE | The text-to-speech handle was invalid.
Comments | The TextToSpeechReset() call flushes all previously queued text and stops all audio output. If the TextToSpeechOpenInMemory() call has enabled outputting the speech samples to memory, then all queued memory buffers will be returned to the calling application. If the bReset flag is on and the text-to-speech system is in one of its special modes (log-file, wave-file or speech-to-memory mode), then all files will be closed and the text-to-speech system is returned to the startup state. TextToSpeechReset() should be called before TextToSpeechCloseInMemory(). Failing to do this in a situation where the synthesizer is busy may result in a deadlock.
See Also | Special Text-To-Speech Modes TextToSpeechOpenInMemory TextToSpeechOpenLogFile TextToSpeechOpenWaveOutFile TextToSpeechPause