Commit 419ab928 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dmime: Get rid of the DMUS_PMSGItem typedef.

parent 6cd1c4e6
...@@ -62,24 +62,24 @@ struct performance ...@@ -62,24 +62,24 @@ struct performance
DWORD procThreadId; DWORD procThreadId;
BOOL procThreadTicStarted; BOOL procThreadTicStarted;
CRITICAL_SECTION safe; CRITICAL_SECTION safe;
struct DMUS_PMSGItem *head; struct message *head;
struct DMUS_PMSGItem *imm_head; struct message *imm_head;
IReferenceClock *master_clock; IReferenceClock *master_clock;
REFERENCE_TIME init_time; REFERENCE_TIME init_time;
}; };
typedef struct DMUS_PMSGItem DMUS_PMSGItem; struct message
struct DMUS_PMSGItem { {
DMUS_PMSGItem* next; struct message *next;
DMUS_PMSGItem* prev; struct message *prev;
BOOL bInUse; BOOL bInUse;
DWORD cb; DWORD cb;
DMUS_PMSG pMsg; DMUS_PMSG pMsg;
}; };
#define DMUS_PMSGToItem(pMSG) ((DMUS_PMSGItem *)(((unsigned char *)pMSG) - offsetof(DMUS_PMSGItem, pMsg))) #define DMUS_PMSGToItem(pMSG) ((struct message *)(((unsigned char *)pMSG) - offsetof(struct message, pMsg)))
#define DMUS_ItemRemoveFromQueue(This,pItem) \ #define DMUS_ItemRemoveFromQueue(This,pItem) \
{\ {\
if (pItem->prev) pItem->prev->next = pItem->next;\ if (pItem->prev) pItem->prev->next = pItem->next;\
...@@ -95,7 +95,8 @@ struct DMUS_PMSGItem { ...@@ -95,7 +95,8 @@ struct DMUS_PMSGItem {
#define PROCESSMSG_ADD (WM_APP + 4) #define PROCESSMSG_ADD (WM_APP + 4)
static DMUS_PMSGItem* ProceedMsg(struct performance *This, DMUS_PMSGItem* cur) { static struct message *ProceedMsg(struct performance *This, struct message *cur)
{
if (cur->pMsg.dwType == DMUS_PMSGT_NOTIFICATION) { if (cur->pMsg.dwType == DMUS_PMSGT_NOTIFICATION) {
SetEvent(This->hNotification); SetEvent(This->hNotification);
} }
...@@ -117,9 +118,9 @@ static DWORD WINAPI ProcessMsgThread(LPVOID lpParam) { ...@@ -117,9 +118,9 @@ static DWORD WINAPI ProcessMsgThread(LPVOID lpParam) {
MSG msg; MSG msg;
HRESULT hr; HRESULT hr;
REFERENCE_TIME rtCurTime; REFERENCE_TIME rtCurTime;
DMUS_PMSGItem* it = NULL; struct message *it = NULL;
DMUS_PMSGItem* cur = NULL; struct message *cur = NULL;
DMUS_PMSGItem* it_next = NULL; struct message *it_next = NULL;
while (TRUE) { while (TRUE) {
DWORD dwDec = This->rtLatencyTime + This->dwBumperLength; DWORD dwDec = This->rtLatencyTime + This->dwBumperLength;
...@@ -401,10 +402,10 @@ static HRESULT WINAPI performance_GetBumperLength(IDirectMusicPerformance8 *ifac ...@@ -401,10 +402,10 @@ static HRESULT WINAPI performance_GetBumperLength(IDirectMusicPerformance8 *ifac
static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS_PMSG *msg) static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS_PMSG *msg)
{ {
struct performance *This = impl_from_IDirectMusicPerformance8(iface); struct performance *This = impl_from_IDirectMusicPerformance8(iface);
DMUS_PMSGItem *message; struct message *message;
DMUS_PMSGItem *it = NULL; struct message *it = NULL;
DMUS_PMSGItem *prev_it = NULL; struct message *prev_it = NULL;
DMUS_PMSGItem **queue; struct message **queue;
HRESULT hr; HRESULT hr;
FIXME("(%p, %p): semi-stub\n", This, msg); FIXME("(%p, %p): semi-stub\n", This, msg);
...@@ -535,14 +536,14 @@ static HRESULT WINAPI performance_GetTime(IDirectMusicPerformance8 *iface, REFER ...@@ -535,14 +536,14 @@ static HRESULT WINAPI performance_GetTime(IDirectMusicPerformance8 *iface, REFER
static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULONG size, DMUS_PMSG **msg) static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULONG size, DMUS_PMSG **msg)
{ {
struct performance *This = impl_from_IDirectMusicPerformance8(iface); struct performance *This = impl_from_IDirectMusicPerformance8(iface);
DMUS_PMSGItem *message; struct message *message;
TRACE("(%p, %ld, %p)\n", This, size, msg); TRACE("(%p, %ld, %p)\n", This, size, msg);
if (!msg) return E_POINTER; if (!msg) return E_POINTER;
if (size < sizeof(DMUS_PMSG)) return E_INVALIDARG; if (size < sizeof(DMUS_PMSG)) return E_INVALIDARG;
if (!(message = calloc(1, size - sizeof(DMUS_PMSG) + sizeof(DMUS_PMSGItem)))) return E_OUTOFMEMORY; if (!(message = calloc(1, size - sizeof(DMUS_PMSG) + sizeof(struct message)))) return E_OUTOFMEMORY;
message->pMsg.dwSize = size; message->pMsg.dwSize = size;
*msg = &message->pMsg; *msg = &message->pMsg;
...@@ -552,7 +553,7 @@ static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULO ...@@ -552,7 +553,7 @@ static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULO
static HRESULT WINAPI performance_FreePMsg(IDirectMusicPerformance8 *iface, DMUS_PMSG *msg) static HRESULT WINAPI performance_FreePMsg(IDirectMusicPerformance8 *iface, DMUS_PMSG *msg)
{ {
struct performance *This = impl_from_IDirectMusicPerformance8(iface); struct performance *This = impl_from_IDirectMusicPerformance8(iface);
DMUS_PMSGItem *message; struct message *message;
HRESULT hr; HRESULT hr;
TRACE("(%p, %p)\n", This, msg); TRACE("(%p, %p)\n", This, msg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment