Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- dlls/dmsynth/dmsynth_private.h | 7 +++---- dlls/dmsynth/synthsink.c | 12 +++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/dmsynth/dmsynth_private.h b/dlls/dmsynth/dmsynth_private.h index 22d020992b8..2a2e88c8e88 100644 --- a/dlls/dmsynth/dmsynth_private.h +++ b/dlls/dmsynth/dmsynth_private.h @@ -72,13 +72,12 @@ struct IDirectMusicSynth8Impl { * IDirectMusicSynthSinkImpl implementation structure */ struct IDirectMusicSynthSinkImpl { - /* IUnknown fields */ IDirectMusicSynthSink IDirectMusicSynthSink_iface; IKsControl IKsControl_iface; LONG ref; - - /* IDirectMusicSynthSinkImpl fields */ - IReferenceClock* latency_clock; + IReferenceClock *latency_clock; + IReferenceClock *master_clock; + BOOL active; };
/********************************************************************** diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index 46011eae27a..72fd671a415 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -81,6 +81,8 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_Release(IDirectMusicSynthSink *ifa if (!ref) { if (This->latency_clock) IReferenceClock_Release(This->latency_clock); + if (This->master_clock) + IReferenceClock_Release(This->master_clock); HeapFree(GetProcessHeap(), 0, This); DMSYNTH_UnlockModule(); } @@ -104,7 +106,15 @@ static HRESULT WINAPI IDirectMusicSynthSinkImpl_SetMasterClock(IDirectMusicSynth { 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; }