TTS_EVENT_CB
Invoked when specific events occur.
typedef TTSRETVAL (*TTS_EVENT_CB)(
LH_VOID* pAppData,
LH_VOID* pEvent,
LH_U16 cEventBytes,
LH_U16 eEvent);
Argument |
Description |
---|---|
pAppData |
Application data pointer that was passed into TtsOpen. |
pEvent |
Pointer to a buffer containing an event-type-specific structure providing the event-related information. The type of the structure for each event type is listed below. The event type is the first item in each pair, the corresponding structure is the second item.
|
cEventBytes |
Size of the buffer in bytes. |
eEvent |
Type of event that occurred. Can be one of the following:
|
Use this callback to return markers to the application. Each marker represents a single event. For a description of the different event types, see TTS_EVENT.
You must specify which marker types to receive by calling TtsSetParamsEx for the TTS_MARKER_MODE_PARAM parameter. For a description of the supported marker types, see TTS_MARKER.
There is one call to TTS_EVENT_CB for each separate marker. A marker is thrown before the call to TTS_DEST_CB that delivers the first audio sample aligned with it. In other words, the application receives the marker information in advance of the corresponding speech.
To register your callback, see TTS_OPEN_PARAMS.