AudRecordLib
|
Implements the message processing functions for AudRecord's sampling thread. More...
Typedefs | |
typedef void | DispatchFunction (PVOID pParam) |
Functions | |
C_ASSERT (ARRAYSIZE(g_dispatchFns)==(LAST_THREAD_MESSAGE-FIRST_THREAD_MESSAGE)) | |
BOOL | SendThreadMessage (DWORD threadId, UINT msg, PVOID pParam) |
void | ActOnMessage (const MSG &msg) |
Implements the message processing functions for AudRecord's sampling thread.
typedef void DispatchFunction(PVOID pParam) |
The type of all functions which are called in response to messages
void ActOnMessage | ( | const MSG & | msg | ) |
Responds to a thread message by calling the appropriate callback and then signals the event to enable the calling thread to continue.
If the message is a standard Windows message, Translate/DispatchMessage are called instead and no event is set
msg | The message to act on |
BOOL SendThreadMessage | ( | DWORD | threadId, |
UINT | msg, | ||
PVOID | pParam | ||
) |
A blocking equivalent of PostThreadMessage
Creates a Windows event, posts the message to thread using PostThreadMessage and waits for the event to be signalled by the processing thread. If the message is out of the range delimited by the ThreadMessage enumeration the function fails trivially.
threadId | Thread to send the message to |
msg | Message id to send |
pParam | Additional message data |