diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index dd96c87ef34..3aec7dd8825 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -760,20 +760,20 @@ static HRESULT WINAPI test_sink_latency_clock_GetTime(IReferenceClock *iface, RE } static HRESULT WINAPI test_sink_latency_clock_AdviseTime(IReferenceClock *iface, - REFERENCE_TIME base, REFERENCE_TIME offset, HANDLE event, DWORD *cookie) + REFERENCE_TIME base, REFERENCE_TIME offset, HEVENT event, DWORD_PTR *cookie) { ok(0, "unexpected %s\n", __func__); return E_NOTIMPL; } static HRESULT WINAPI test_sink_latency_clock_AdvisePeriodic(IReferenceClock *iface, - REFERENCE_TIME start, REFERENCE_TIME period, HANDLE semaphore, DWORD *cookie) + REFERENCE_TIME start, REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie) { ok(0, "unexpected %s\n", __func__); return E_NOTIMPL; } -static HRESULT WINAPI test_sink_latency_clock_Unadvise(IReferenceClock *iface, DWORD cookie) +static HRESULT WINAPI test_sink_latency_clock_Unadvise(IReferenceClock *iface, DWORD_PTR cookie) { ok(0, "unexpected %s\n", __func__); return E_NOTIMPL; diff --git a/dlls/dmusic/clock.c b/dlls/dmusic/clock.c index 19441d3d56f..7b574dd4432 100644 --- a/dlls/dmusic/clock.c +++ b/dlls/dmusic/clock.c @@ -80,30 +80,26 @@ static HRESULT WINAPI IReferenceClockImpl_GetTime(IReferenceClock *iface, REFERE return S_OK; } -static HRESULT WINAPI IReferenceClockImpl_AdviseTime(IReferenceClock *iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie) +static HRESULT WINAPI IReferenceClockImpl_AdviseTime(IReferenceClock *iface, REFERENCE_TIME base, + REFERENCE_TIME offset, HEVENT event, DWORD_PTR *cookie) { IReferenceClockImpl *This = impl_from_IReferenceClock(iface); - - FIXME("(%p)->(0x%s, 0x%s, %p, %p): stub\n", This, wine_dbgstr_longlong(baseTime), wine_dbgstr_longlong(streamTime), hEvent, pdwAdviseCookie); - + FIXME("(%p)->(%I64d, %I64d, %#Ix, %p): stub\n", This, base, offset, event, cookie); return S_OK; } -static HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie) +static HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME start, + REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie) { IReferenceClockImpl *This = impl_from_IReferenceClock(iface); - - FIXME("(%p)->(0x%s, 0x%s, %p, %p): stub\n", This, wine_dbgstr_longlong(startTime), wine_dbgstr_longlong(periodTime), hSemaphore, pdwAdviseCookie); - + FIXME("(%p)->(%I64d, %I64d, %#Ix, %p): stub\n", This, start, period, semaphore, cookie); return S_OK; } -static HRESULT WINAPI IReferenceClockImpl_Unadvise(IReferenceClock *iface, DWORD dwAdviseCookie) +static HRESULT WINAPI IReferenceClockImpl_Unadvise(IReferenceClock *iface, DWORD_PTR cookie) { IReferenceClockImpl *This = impl_from_IReferenceClock(iface); - - FIXME("(%p, %ld): stub\n", This, dwAdviseCookie); - + FIXME("(%p, %#Ix): stub\n", This, cookie); return S_OK; } diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index d284b32fdd7..970fb28ebd2 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -96,25 +96,23 @@ static HRESULT WINAPI master_IReferenceClock_GetTime(IReferenceClock *iface, return hr; } -static HRESULT WINAPI master_IReferenceClock_AdviseTime(IReferenceClock *iface, - REFERENCE_TIME base, REFERENCE_TIME offset, HANDLE event, DWORD *cookie) +static HRESULT WINAPI master_IReferenceClock_AdviseTime(IReferenceClock *iface, REFERENCE_TIME base, + REFERENCE_TIME offset, HEVENT event, DWORD_PTR *cookie) { - TRACE("(%p, %s, %s, %p, %p): method not implemented\n", iface, wine_dbgstr_longlong(base), - wine_dbgstr_longlong(offset), event, cookie); + FIXME("(%p, %I64d, %I64d, %#Ix, %p): stub\n", iface, base, offset, event, cookie); return E_NOTIMPL; } -static HRESULT WINAPI master_IReferenceClock_AdvisePeriodic(IReferenceClock *iface, - REFERENCE_TIME start, REFERENCE_TIME period, HANDLE semaphore, DWORD *cookie) +static HRESULT WINAPI master_IReferenceClock_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME start, + REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie) { - TRACE("(%p, %s, %s, %p, %p): method not implemented\n", iface, wine_dbgstr_longlong(start), - wine_dbgstr_longlong(period), semaphore, cookie); + FIXME("(%p, %I64d, %I64d, %#Ix, %p): stub\n", iface, start, period, semaphore, cookie); return E_NOTIMPL; } -static HRESULT WINAPI master_IReferenceClock_Unadvise(IReferenceClock *iface, DWORD cookie) +static HRESULT WINAPI master_IReferenceClock_Unadvise(IReferenceClock *iface, DWORD_PTR cookie) { - TRACE("(%p, %#lx): method not implemented\n", iface, cookie); + FIXME("(%p, %#Ix): stub\n", iface, cookie); return E_NOTIMPL; } diff --git a/dlls/dmusic/tests/dmusic.c b/dlls/dmusic/tests/dmusic.c index a8152822613..1561c51df76 100644 --- a/dlls/dmusic/tests/dmusic.c +++ b/dlls/dmusic/tests/dmusic.c @@ -862,7 +862,7 @@ static void test_master_clock(void) LARGE_INTEGER counter, freq; DMUS_CLOCKINFO clock_info; IDirectMusic *dmusic; - DWORD cookie; + DWORD_PTR cookie; HRESULT hr; ULONG ref; GUID guid; @@ -912,10 +912,10 @@ static void test_master_clock(void) ok(time2 - time1 > 80 * 10000, "Expected about %s, but got %s.\n", wine_dbgstr_longlong(time1 + 100 * 10000), wine_dbgstr_longlong(time2)); - hr = IReferenceClock_AdviseTime(clock, 0, 0, NULL, &cookie); + hr = IReferenceClock_AdviseTime(clock, 0, 0, 0, &cookie); ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); - hr = IReferenceClock_AdvisePeriodic(clock, 0, 0, NULL, &cookie); + hr = IReferenceClock_AdvisePeriodic(clock, 0, 0, 0, &cookie); ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr); hr = IReferenceClock_Unadvise(clock, 0); diff --git a/include/dmusicc.h b/include/dmusicc.h index 94ff184dc9f..351f2733ee2 100644 --- a/include/dmusicc.h +++ b/include/dmusicc.h @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -108,8 +109,6 @@ typedef struct IDirectMusicPort *LPDIRECTMUSICPORT; typedef struct IDirectMusicPort IDirectMusicPort8, *LPDIRECTMUSICPORT8; typedef struct IDirectMusicThru *LPDIRECTMUSICTHRU; typedef struct IDirectMusicThru IDirectMusicThru8, *LPDIRECTMUSICTHRU8; -typedef struct IReferenceClock *LPREFERENCECLOCK; - /***************************************************************************** * Typedef definitions @@ -381,7 +380,7 @@ DECLARE_INTERFACE_(IDirectMusic,IUnknown) STDMETHOD(CreateMusicBuffer)(THIS_ LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER *ppBuffer, LPUNKNOWN pUnkOuter) PURE; STDMETHOD(CreatePort)(THIS_ REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT *ppPort, LPUNKNOWN pUnkOuter) PURE; STDMETHOD(EnumMasterClock)(THIS_ DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) PURE; - STDMETHOD(GetMasterClock)(THIS_ LPGUID pguidClock, struct IReferenceClock **ppReferenceClock) PURE; + STDMETHOD(GetMasterClock)(THIS_ LPGUID pguidClock, IReferenceClock **ppReferenceClock) PURE; STDMETHOD(SetMasterClock)(THIS_ REFGUID rguidClock) PURE; STDMETHOD(Activate)(THIS_ BOOL fEnable) PURE; STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE; @@ -422,13 +421,13 @@ DECLARE_INTERFACE_(IDirectMusic8,IDirectMusic) STDMETHOD(CreateMusicBuffer)(THIS_ LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER *ppBuffer, LPUNKNOWN pUnkOuter) PURE; STDMETHOD(CreatePort)(THIS_ REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT *ppPort, LPUNKNOWN pUnkOuter) PURE; STDMETHOD(EnumMasterClock)(THIS_ DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) PURE; - STDMETHOD(GetMasterClock)(THIS_ LPGUID pguidClock, struct IReferenceClock **ppReferenceClock) PURE; + STDMETHOD(GetMasterClock)(THIS_ LPGUID pguidClock, IReferenceClock **ppReferenceClock) PURE; STDMETHOD(SetMasterClock)(THIS_ REFGUID rguidClock) PURE; STDMETHOD(Activate)(THIS_ BOOL fEnable) PURE; STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE; STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, HWND hWnd) PURE; /*** IDirectMusic8 methods ***/ - STDMETHOD(SetExternalMasterClock)(THIS_ struct IReferenceClock *pClock) PURE; + STDMETHOD(SetExternalMasterClock)(THIS_ IReferenceClock *pClock) PURE; }; #undef INTERFACE @@ -655,7 +654,7 @@ DECLARE_INTERFACE_(IDirectMusicPort,IUnknown) STDMETHOD(Read)(THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE; STDMETHOD(DownloadInstrument)(THIS_ IDirectMusicInstrument *pInstrument, IDirectMusicDownloadedInstrument **ppDownloadedInstrument, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges) PURE; STDMETHOD(UnloadInstrument)(THIS_ IDirectMusicDownloadedInstrument *pDownloadedInstrument) PURE; - STDMETHOD(GetLatencyClock)(THIS_ struct IReferenceClock **ppClock) PURE; + STDMETHOD(GetLatencyClock)(THIS_ IReferenceClock **ppClock) PURE; STDMETHOD(GetRunningStats)(THIS_ LPDMUS_SYNTHSTATS pStats) PURE; STDMETHOD(Compact)(THIS) PURE; STDMETHOD(GetCaps)(THIS_ LPDMUS_PORTCAPS pPortCaps) PURE; @@ -720,43 +719,6 @@ DECLARE_INTERFACE_(IDirectMusicThru,IUnknown) #define IDirectMusicThru_ThruChannel(p,a,b,c,d,e) (p)->lpVtbl->ThruChannel(p,a,b,c,d,e) #endif - -#ifndef __IReferenceClock_INTERFACE_DEFINED__ -#define __IReferenceClock_INTERFACE_DEFINED__ -DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); - -/***************************************************************************** - * IReferenceClock interface - */ -#define INTERFACE IReferenceClock -DECLARE_INTERFACE_(IReferenceClock,IUnknown) -{ - /*** IUnknown methods ***/ - STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; - STDMETHOD_(ULONG,AddRef)(THIS) PURE; - STDMETHOD_(ULONG,Release)(THIS) PURE; - /*** IReferenceClock methods ***/ - STDMETHOD(GetTime)(THIS_ REFERENCE_TIME *pTime) PURE; - STDMETHOD(AdviseTime)(THIS_ REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD *pdwAdviseCookie) PURE; - STDMETHOD(AdvisePeriodic)(THIS_ REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD *pdwAdviseCookie) PURE; - STDMETHOD(Unadvise)(THIS_ DWORD dwAdviseCookie) PURE; -}; -#undef INTERFACE - -#if !defined(__cplusplus) || defined(CINTERFACE) -/*** IUnknown methods ***/ -#define IReferenceClock_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) -#define IReferenceClock_AddRef(p) (p)->lpVtbl->AddRef(p) -#define IReferenceClock_Release(p) (p)->lpVtbl->Release(p) -/*** IReferenceClock methods ***/ -#define IReferenceClock_GetTime(p,a) (p)->lpVtbl->GetTime(p,a) -#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->lpVtbl->AdviseTime(p,a,b,c,d) -#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->lpVtbl->AdvisePeriodic(p,a,b,c,d) -#define IReferenceClock_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a) -#endif - -#endif /* __IReferenceClock_INTERFACE_DEFINED__ */ - #ifdef __cplusplus } #endif