Browse
 
Tools
Rss Categories

LVTTSClient::GetSynthesizedAudioBuffer

Reference Number: AA-01028 Views: 9798 0 Rating/ Voters

Read all, or some portion of the synthesized audio buffer that was obtained from a  LVTTSClient::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 GetSynthesizedAudioBuffer( void * buffer, int buffer_size_in_bytes, int * bytes_returned )

Parameters

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 TTS client handle is invalid (either Initialize has not been called or Destroy has already been called); or buffer points to an invalid memory location; or results are not yet available.

LV_EXCEPTION

An exception occurred while processing the request.