@@ -62,24 +62,24 @@ struct performance
62
62
DWORD procThreadId ;
63
63
BOOL procThreadTicStarted ;
64
64
CRITICAL_SECTION safe ;
65
- struct DMUS_PMSGItem * head ;
66
- struct DMUS_PMSGItem * imm_head ;
65
+ struct message * head ;
66
+ struct message * imm_head ;
67
67
68
68
IReferenceClock * master_clock ;
69
69
REFERENCE_TIME init_time ;
70
70
};
71
71
72
- typedef struct DMUS_PMSGItem DMUS_PMSGItem ;
73
- struct DMUS_PMSGItem {
74
- DMUS_PMSGItem * next ;
75
- DMUS_PMSGItem * prev ;
72
+ struct message
73
+ {
74
+ struct message * next ;
75
+ struct message * prev ;
76
76
77
- BOOL bInUse ;
78
- DWORD cb ;
79
- DMUS_PMSG pMsg ;
77
+ BOOL bInUse ;
78
+ DWORD cb ;
79
+ DMUS_PMSG pMsg ;
80
80
};
81
81
82
- #define DMUS_PMSGToItem (pMSG ) ((DMUS_PMSGItem *)(((unsigned char *)pMSG) - offsetof(DMUS_PMSGItem , pMsg)))
82
+ #define DMUS_PMSGToItem (pMSG ) ((struct message *)(((unsigned char *)pMSG) - offsetof(struct message , pMsg)))
83
83
#define DMUS_ItemRemoveFromQueue (This ,pItem ) \
84
84
{\
85
85
if (pItem->prev) pItem->prev->next = pItem->next;\
@@ -95,7 +95,8 @@ struct DMUS_PMSGItem {
95
95
#define PROCESSMSG_ADD (WM_APP + 4)
96
96
97
97
98
- static DMUS_PMSGItem * ProceedMsg (struct performance * This , DMUS_PMSGItem * cur ) {
98
+ static struct message * ProceedMsg (struct performance * This , struct message * cur )
99
+ {
99
100
if (cur -> pMsg .dwType == DMUS_PMSGT_NOTIFICATION ) {
100
101
SetEvent (This -> hNotification );
101
102
}
@@ -117,9 +118,9 @@ static DWORD WINAPI ProcessMsgThread(LPVOID lpParam) {
117
118
MSG msg ;
118
119
HRESULT hr ;
119
120
REFERENCE_TIME rtCurTime ;
120
- DMUS_PMSGItem * it = NULL ;
121
- DMUS_PMSGItem * cur = NULL ;
122
- DMUS_PMSGItem * it_next = NULL ;
121
+ struct message * it = NULL ;
122
+ struct message * cur = NULL ;
123
+ struct message * it_next = NULL ;
123
124
124
125
while (TRUE) {
125
126
DWORD dwDec = This -> rtLatencyTime + This -> dwBumperLength ;
@@ -401,10 +402,10 @@ static HRESULT WINAPI performance_GetBumperLength(IDirectMusicPerformance8 *ifac
401
402
static HRESULT WINAPI performance_SendPMsg (IDirectMusicPerformance8 * iface , DMUS_PMSG * msg )
402
403
{
403
404
struct performance * This = impl_from_IDirectMusicPerformance8 (iface );
404
- DMUS_PMSGItem * message ;
405
- DMUS_PMSGItem * it = NULL ;
406
- DMUS_PMSGItem * prev_it = NULL ;
407
- DMUS_PMSGItem * * queue ;
405
+ struct message * message ;
406
+ struct message * it = NULL ;
407
+ struct message * prev_it = NULL ;
408
+ struct message * * queue ;
408
409
HRESULT hr ;
409
410
410
411
FIXME ("(%p, %p): semi-stub\n" , This , msg );
@@ -535,14 +536,14 @@ static HRESULT WINAPI performance_GetTime(IDirectMusicPerformance8 *iface, REFER
535
536
static HRESULT WINAPI performance_AllocPMsg (IDirectMusicPerformance8 * iface , ULONG size , DMUS_PMSG * * msg )
536
537
{
537
538
struct performance * This = impl_from_IDirectMusicPerformance8 (iface );
538
- DMUS_PMSGItem * message ;
539
+ struct message * message ;
539
540
540
541
TRACE ("(%p, %ld, %p)\n" , This , size , msg );
541
542
542
543
if (!msg ) return E_POINTER ;
543
544
if (size < sizeof (DMUS_PMSG )) return E_INVALIDARG ;
544
545
545
- if (!(message = calloc (1 , size - sizeof (DMUS_PMSG ) + sizeof (DMUS_PMSGItem )))) return E_OUTOFMEMORY ;
546
+ if (!(message = calloc (1 , size - sizeof (DMUS_PMSG ) + sizeof (struct message )))) return E_OUTOFMEMORY ;
546
547
message -> pMsg .dwSize = size ;
547
548
* msg = & message -> pMsg ;
548
549
@@ -552,7 +553,7 @@ static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULO
552
553
static HRESULT WINAPI performance_FreePMsg (IDirectMusicPerformance8 * iface , DMUS_PMSG * msg )
553
554
{
554
555
struct performance * This = impl_from_IDirectMusicPerformance8 (iface );
555
- DMUS_PMSGItem * message ;
556
+ struct message * message ;
556
557
HRESULT hr ;
557
558
558
559
TRACE ("(%p, %p)\n" , This , msg );
0 commit comments