TextToSpeechReset(3dtk)

Name

TextToSpeechReset - Flushes all previously queued text and stops any audio output.

Syntax
    MMRESULT TextToSpeechReset (LPTTS_HANDLE_T phTTS,
                               BOOL bReset)

Parameters

LPTTS_HANDLE_T phTTS
    Specifies an opened text-to-speech handle.

BOOL bReset
    Specifies one of the following Boolean values:

Value | Description
FALSE
 | If the text-to-speech system is in a special mode (such as log-file, wave-file, or speech-to-memory mode), the current mode is preserved.
TRUE
 | The text-to-speech system is returned to the startup state and any open text-to-speech files are closed. However, if the text-to-speech system has been paused by TextToSpeechPause(), TextToSpeechReset() will not resume it.

Description

This function flushes all previously queued text from the text-to-speech system and stops any audio output. If the TextToSpeechOpenInMemory() function has enabled writing speech samples to memory, all queued memory buffers are returned to the calling application. If the bReset flag is TRUE and the text-to-speech system is in one of its special modes (log-file, wave-file, or speech-to-memory), all files are closed and the text-to-speech system is returned to the startup state.

TextToSpeechReset() should be called before calling TextToSpeechCloseInMemory(). Failing to do this in a situation where the synthesizer is busy may result in a deadlock.

Return Values

This function returns a value of type MMRESULT. The value is zero if the function 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.

See Also

Special Text-To-Speech Modes (DECtalk Software Programmer's Guide)

TextToSpeechOpenInMemory(3dtk), TextToSpeechOpenLogFile(3dtk), TextToSpeechOpenWaveOutFile(3dtk), TextToSpeechPause(3dtk)