Browse
 
Tools
Rss Categories

LV_TTS_GetSynthesizedAudioBuffer

Reference Number: AA-00996 Views: 10759 0 Rating/ Voters
Read all, or some portion of the synthesized audio buffer that was obtained from a LV_TTS_Synthesize call. Each successive invocation of this function reads the buffer at an offset that is after the last sample read in the previous call.

Function

  • LV_TTS_RETURN_CODE LV_TTS_GetSynthesizedAudioBuffer(HTTSCLIENT client_handle, void * buffer, int buffer_size_in_bytes, int* bytes_returned);

Parameters

client_handle

Handle to the TTS client object.

buffer

Location of memory buffer where the synthesized audio samples need to be copied into.

buffer_size_in_bytes

Amount of memory allocated for buffer, number of bytes of synthesized audio samples to be read into buffer.

bytes_returned

The number of bytes of synthesized audio samples actually copied into buffer. This may be less than buffer_size_in_bytes if there is not sufficient data available.

Return Values

LV_SUCCESS

No errors; bytes_returned bytes of synthesized audio samples have been copied into buffer.

LV_FAILURE

The input TTS client handle is not a valid one; or buffer points to an invalid memory location; or results are not yet available.

LV_EXCEPTION

An exception occurred while processing the request.