Commit bdea8924 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmsynth: Implement SetMasterClock() for the sink.

parent 98ecff27
...@@ -72,13 +72,12 @@ struct IDirectMusicSynth8Impl { ...@@ -72,13 +72,12 @@ struct IDirectMusicSynth8Impl {
* IDirectMusicSynthSinkImpl implementation structure * IDirectMusicSynthSinkImpl implementation structure
*/ */
struct IDirectMusicSynthSinkImpl { struct IDirectMusicSynthSinkImpl {
/* IUnknown fields */
IDirectMusicSynthSink IDirectMusicSynthSink_iface; IDirectMusicSynthSink IDirectMusicSynthSink_iface;
IKsControl IKsControl_iface; IKsControl IKsControl_iface;
LONG ref; LONG ref;
IReferenceClock *latency_clock;
/* IDirectMusicSynthSinkImpl fields */ IReferenceClock *master_clock;
IReferenceClock* latency_clock; BOOL active;
}; };
/********************************************************************** /**********************************************************************
......
...@@ -81,6 +81,8 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_Release(IDirectMusicSynthSink *ifa ...@@ -81,6 +81,8 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_Release(IDirectMusicSynthSink *ifa
if (!ref) { if (!ref) {
if (This->latency_clock) if (This->latency_clock)
IReferenceClock_Release(This->latency_clock); IReferenceClock_Release(This->latency_clock);
if (This->master_clock)
IReferenceClock_Release(This->master_clock);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
DMSYNTH_UnlockModule(); DMSYNTH_UnlockModule();
} }
...@@ -104,7 +106,15 @@ static HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock(IDirectMusicSynth ...@@ -104,7 +106,15 @@ static HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock(IDirectMusicSynth
{ {
IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface); IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface);
FIXME("(%p)->(%p): stub\n", This, clock); TRACE("(%p)->(%p)\n", This, clock);
if (!clock)
return E_POINTER;
if (This->active)
return E_FAIL;
IReferenceClock_AddRef(clock);
This->master_clock = clock;
return S_OK; return S_OK;
} }
......
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