Michael Stefaniuc : dmsynth: Implement SetMasterClock() for the sink.
Alexandre Julliard
julliard at winehq.org
Fri Jan 21 15:54:49 CST 2022
Module: wine
Branch: master
Commit: bdea89242cc3fb1833b29de4cc0f812bb1767204
URL: https://source.winehq.org/git/wine.git/?a=commit;h=bdea89242cc3fb1833b29de4cc0f812bb1767204
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Fri Jan 21 18:41:10 2022 +0100
dmsynth: Implement SetMasterClock() for the sink.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at 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;
}
More information about the wine-cvs
mailing list