Commit 23b61b0d authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

include: Use IReferenceClock interface from strmif.idl in dmusicc.h.

parent ec2a7a32
...@@ -760,20 +760,20 @@ static HRESULT WINAPI test_sink_latency_clock_GetTime(IReferenceClock *iface, RE ...@@ -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, 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__); ok(0, "unexpected %s\n", __func__);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI test_sink_latency_clock_AdvisePeriodic(IReferenceClock *iface, 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__); ok(0, "unexpected %s\n", __func__);
return E_NOTIMPL; 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__); ok(0, "unexpected %s\n", __func__);
return E_NOTIMPL; return E_NOTIMPL;
......
...@@ -80,30 +80,26 @@ static HRESULT WINAPI IReferenceClockImpl_GetTime(IReferenceClock *iface, REFERE ...@@ -80,30 +80,26 @@ static HRESULT WINAPI IReferenceClockImpl_GetTime(IReferenceClock *iface, REFERE
return S_OK; 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); IReferenceClockImpl *This = impl_from_IReferenceClock(iface);
FIXME("(%p)->(%I64d, %I64d, %#Ix, %p): stub\n", This, base, offset, event, cookie);
FIXME("(%p)->(0x%s, 0x%s, %p, %p): stub\n", This, wine_dbgstr_longlong(baseTime), wine_dbgstr_longlong(streamTime), hEvent, pdwAdviseCookie);
return S_OK; 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); IReferenceClockImpl *This = impl_from_IReferenceClock(iface);
FIXME("(%p)->(%I64d, %I64d, %#Ix, %p): stub\n", This, start, period, semaphore, cookie);
FIXME("(%p)->(0x%s, 0x%s, %p, %p): stub\n", This, wine_dbgstr_longlong(startTime), wine_dbgstr_longlong(periodTime), hSemaphore, pdwAdviseCookie);
return S_OK; 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); IReferenceClockImpl *This = impl_from_IReferenceClock(iface);
FIXME("(%p, %#Ix): stub\n", This, cookie);
FIXME("(%p, %ld): stub\n", This, dwAdviseCookie);
return S_OK; return S_OK;
} }
......
...@@ -96,25 +96,23 @@ static HRESULT WINAPI master_IReferenceClock_GetTime(IReferenceClock *iface, ...@@ -96,25 +96,23 @@ static HRESULT WINAPI master_IReferenceClock_GetTime(IReferenceClock *iface,
return hr; return hr;
} }
static HRESULT WINAPI master_IReferenceClock_AdviseTime(IReferenceClock *iface, static HRESULT WINAPI master_IReferenceClock_AdviseTime(IReferenceClock *iface, REFERENCE_TIME base,
REFERENCE_TIME base, REFERENCE_TIME offset, HANDLE event, DWORD *cookie) REFERENCE_TIME offset, HEVENT event, DWORD_PTR *cookie)
{ {
TRACE("(%p, %s, %s, %p, %p): method not implemented\n", iface, wine_dbgstr_longlong(base), FIXME("(%p, %I64d, %I64d, %#Ix, %p): stub\n", iface, base, offset, event, cookie);
wine_dbgstr_longlong(offset), event, cookie);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI master_IReferenceClock_AdvisePeriodic(IReferenceClock *iface, static HRESULT WINAPI master_IReferenceClock_AdvisePeriodic(IReferenceClock *iface, REFERENCE_TIME start,
REFERENCE_TIME start, REFERENCE_TIME period, HANDLE semaphore, DWORD *cookie) REFERENCE_TIME period, HSEMAPHORE semaphore, DWORD_PTR *cookie)
{ {
TRACE("(%p, %s, %s, %p, %p): method not implemented\n", iface, wine_dbgstr_longlong(start), FIXME("(%p, %I64d, %I64d, %#Ix, %p): stub\n", iface, start, period, semaphore, cookie);
wine_dbgstr_longlong(period), semaphore, cookie);
return E_NOTIMPL; 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; return E_NOTIMPL;
} }
......
...@@ -862,7 +862,7 @@ static void test_master_clock(void) ...@@ -862,7 +862,7 @@ static void test_master_clock(void)
LARGE_INTEGER counter, freq; LARGE_INTEGER counter, freq;
DMUS_CLOCKINFO clock_info; DMUS_CLOCKINFO clock_info;
IDirectMusic *dmusic; IDirectMusic *dmusic;
DWORD cookie; DWORD_PTR cookie;
HRESULT hr; HRESULT hr;
ULONG ref; ULONG ref;
GUID guid; GUID guid;
...@@ -912,10 +912,10 @@ static void test_master_clock(void) ...@@ -912,10 +912,10 @@ static void test_master_clock(void)
ok(time2 - time1 > 80 * 10000, "Expected about %s, but got %s.\n", ok(time2 - time1 > 80 * 10000, "Expected about %s, but got %s.\n",
wine_dbgstr_longlong(time1 + 100 * 10000), wine_dbgstr_longlong(time2)); 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); 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); ok(hr == E_NOTIMPL, "Got hr %#lx.\n", hr);
hr = IReferenceClock_Unadvise(clock, 0); hr = IReferenceClock_Unadvise(clock, 0);
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <dmdls.h> #include <dmdls.h>
#include <dsound.h> #include <dsound.h>
#include <dmusbuff.h> #include <dmusbuff.h>
#include <strmif.h>
#include <pshpack8.h> #include <pshpack8.h>
...@@ -108,8 +109,6 @@ typedef struct IDirectMusicPort *LPDIRECTMUSICPORT; ...@@ -108,8 +109,6 @@ typedef struct IDirectMusicPort *LPDIRECTMUSICPORT;
typedef struct IDirectMusicPort IDirectMusicPort8, *LPDIRECTMUSICPORT8; typedef struct IDirectMusicPort IDirectMusicPort8, *LPDIRECTMUSICPORT8;
typedef struct IDirectMusicThru *LPDIRECTMUSICTHRU; typedef struct IDirectMusicThru *LPDIRECTMUSICTHRU;
typedef struct IDirectMusicThru IDirectMusicThru8, *LPDIRECTMUSICTHRU8; typedef struct IDirectMusicThru IDirectMusicThru8, *LPDIRECTMUSICTHRU8;
typedef struct IReferenceClock *LPREFERENCECLOCK;
/***************************************************************************** /*****************************************************************************
* Typedef definitions * Typedef definitions
...@@ -381,7 +380,7 @@ DECLARE_INTERFACE_(IDirectMusic,IUnknown) ...@@ -381,7 +380,7 @@ DECLARE_INTERFACE_(IDirectMusic,IUnknown)
STDMETHOD(CreateMusicBuffer)(THIS_ LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER *ppBuffer, LPUNKNOWN pUnkOuter) PURE; 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(CreatePort)(THIS_ REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT *ppPort, LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(EnumMasterClock)(THIS_ DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) 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(SetMasterClock)(THIS_ REFGUID rguidClock) PURE;
STDMETHOD(Activate)(THIS_ BOOL fEnable) PURE; STDMETHOD(Activate)(THIS_ BOOL fEnable) PURE;
STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE; STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE;
...@@ -422,13 +421,13 @@ DECLARE_INTERFACE_(IDirectMusic8,IDirectMusic) ...@@ -422,13 +421,13 @@ DECLARE_INTERFACE_(IDirectMusic8,IDirectMusic)
STDMETHOD(CreateMusicBuffer)(THIS_ LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER *ppBuffer, LPUNKNOWN pUnkOuter) PURE; 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(CreatePort)(THIS_ REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT *ppPort, LPUNKNOWN pUnkOuter) PURE;
STDMETHOD(EnumMasterClock)(THIS_ DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) 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(SetMasterClock)(THIS_ REFGUID rguidClock) PURE;
STDMETHOD(Activate)(THIS_ BOOL fEnable) PURE; STDMETHOD(Activate)(THIS_ BOOL fEnable) PURE;
STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE; STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE;
STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, HWND hWnd) PURE; STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, HWND hWnd) PURE;
/*** IDirectMusic8 methods ***/ /*** IDirectMusic8 methods ***/
STDMETHOD(SetExternalMasterClock)(THIS_ struct IReferenceClock *pClock) PURE; STDMETHOD(SetExternalMasterClock)(THIS_ IReferenceClock *pClock) PURE;
}; };
#undef INTERFACE #undef INTERFACE
...@@ -655,7 +654,7 @@ DECLARE_INTERFACE_(IDirectMusicPort,IUnknown) ...@@ -655,7 +654,7 @@ DECLARE_INTERFACE_(IDirectMusicPort,IUnknown)
STDMETHOD(Read)(THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE; STDMETHOD(Read)(THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE;
STDMETHOD(DownloadInstrument)(THIS_ IDirectMusicInstrument *pInstrument, IDirectMusicDownloadedInstrument **ppDownloadedInstrument, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges) PURE; STDMETHOD(DownloadInstrument)(THIS_ IDirectMusicInstrument *pInstrument, IDirectMusicDownloadedInstrument **ppDownloadedInstrument, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges) PURE;
STDMETHOD(UnloadInstrument)(THIS_ IDirectMusicDownloadedInstrument *pDownloadedInstrument) 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(GetRunningStats)(THIS_ LPDMUS_SYNTHSTATS pStats) PURE;
STDMETHOD(Compact)(THIS) PURE; STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(GetCaps)(THIS_ LPDMUS_PORTCAPS pPortCaps) PURE; STDMETHOD(GetCaps)(THIS_ LPDMUS_PORTCAPS pPortCaps) PURE;
...@@ -720,43 +719,6 @@ DECLARE_INTERFACE_(IDirectMusicThru,IUnknown) ...@@ -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) #define IDirectMusicThru_ThruChannel(p,a,b,c,d,e) (p)->lpVtbl->ThruChannel(p,a,b,c,d,e)
#endif #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 #ifdef __cplusplus
} }
#endif #endif
......
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