SPEVENTSOURCEINFO
SPEVENTSOURCEINFO is used by ISpEventSource::GetInfo to pass back information about the event source.
Event sources contain a queue, which hold events until a caller retrieves the events using ::GetEvents.
typedef struct SPEVENTSOURCEINFO
{
ULONGLONG ullEventInterest;
ULONGLONG ullQueuedInterest;
ULONG ulCount;
} SPEVENTSOURCEINFO;
Members
- ullEventInterest
- Set of event Id flags of type SPEVENTENUM defining which events should trigger a notification (e.g. callback, signaled event, window message, etc.).
- ullQueuedInterest
- Set of event Id flags of type SPEVENTENUM defining which events should be stored in the source's event queue until the caller uses ISpEventSource::GetEvents to remove them.
- ulCount
- Number of events currently waiting in the event queue.
Remarks
Note that event interest (ullEventInterest) only specifies which events should cause a notification. The queued interest (ullQueuedInterest) specifies which events should be stored in the event queue.
For example, due to graphics performance issues, it might not be optimal for an application to redraw every viseme that occurs. Instead, it would draw the current viseme whenever a viseme event occurs. Instead of storing viseme events in the event queue, the application would set only the event interest to include SPEI_VISEME and not the queued interest. Whenever the TTS engine fires a viseme event, the application would receive a notification, and would then check the current viseme by calling ISpVoice::GetStatus to check the VisemeId.
The queued interest (ullQueuedInterest) always includes the event interest (ullEventInterest) to ensure that a notification is sent whenever an event is queued.