TextToSpeechReturnBuffer(3dtk)

Name

TextToSpeechReturnBuffer - Returns the current in-memory speech buffer.

Syntax
    MMRESULT TextToSpeechReturnBuffer (LPTTS_HANDLE_T phTTS,
                                      LPTTS_BUFFER_T *ppTTSBuffer)

Parameters

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

LPTTS_BUFFER_T *ppTTSBuffer
    Specifies a pointer to a pointer to a structure containing the memory buffers. Buffers were previously supplied by the application to be used while in speech-to-memory mode.

Description

This function returns the current buffer when an application is using the speech-to-memory capability. The buffer can be empty or partially full when it is returned. The dwBufferLength element of the TTS_BUFFER_T structure contains the number of samples in the buffer. If no buffer is available, a NULL pointer is returned in ppTTSBuffer.

Most applications do not require this function, because buffers are automatically returned when filled or when a TTS_FORCE flag is passed in the TextToSpeechSpeak() function. The TextToSpeechReturnBuffer() function is provided so that an application can return a buffer before it is filled and, therefore, obtain more speech samples immediately. See the DECtalk Software Programmer's Guide for more information on the TTS_BUFFER_T structure.

TextToSpeechAddBuffer() must be called before calling TextToSpeechReturnBuffer().

Return Values

This function returns a value of type MMRESULT. The value is zero if the function successful. The return value is one of the following constants:

Constant | Description
MMSYSERR_NOERROR
 | Normal successful completion (zero).
MMSYSERR_INVALPARAM
 | An invalid parameter was passed.
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

TextToSpeechAddBuffer(3dtk)