TextToSpeechAddBuffer(3dtk)

Name

TextToSpeechAddBuffer - Adds a memory buffer to the text-to-speech system.

Syntax
    MMRESULT TextToSpeechAddBuffer (LPTTS_HANDLE_T phTTS,
                                   LPTTS_BUFFER_T pTTSBuffer)

Parameters

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

LPTTS_BUFFER_T pTTSbuffer
    Points to a structure containing the memory buffers. Buffers are supplied by the application to be used while in speech-to-memory mode.

Description

This function supplies a memory buffer to the text-to-speech system. This memory buffer is used to store speech samples while DECtalk is in the speech-to-memory mode.

The application must call TextToSpeechOpenInMemory() before calling TextToSpeechAddBuffer(). The memory buffer is passed using the TTS_BUFFER_T structure. The user must allocate the structure and its associated elements (memory buffer, phoneme array, and index mark array). Refer to the DECtalk Software Programmer's Guide, Speech-To-Memory Mode section for more information on the TTS_BUFFER_T structure and its elements.

The text-to-speech system returns the buffer to the application when the memory buffer, phoneme array, or index mark array is full or when a TTS_FORCE was used in the TextToSpeechSpeak() call. Refer to the DECtalk Software Programmer's Guide, Callback Routines and Window Procedures section for details on passing information back to the calling application.

Return Values

This function 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_INVALPARAM
 | Invalid parameter.
MMSYSERR_ERROR
 | Output to memory not enabled or unable to create a system object.
MMSYSERR_INVALHANDLE
 | The text-to-speech handle was invalid.

See Also

TextToSpeechOpenInMemory(3dtk), TextToSpeechReturnBuffer(3dtk), TextToSpeechStartup(3dtk), TextToSpeechStartupEx(3dtk)

Callback Routines and Window Procedures (DECtalk Software Programmer's Guide)

Speech-to-Memory Mode (DECtalk Software Programmer's Guide)