dmsynth: Implement SetMasterClock() for the sink.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2022-01-21 18:41:10 +01:00 committed by Alexandre Julliard
parent 98ecff2760
commit bdea89242c
2 changed files with 14 additions and 5 deletions

View File

@ -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;
};
/**********************************************************************

View File

@ -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;
}