dmusic: Store the master clock as an IReferenceClock pointer.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-06-14 11:42:44 -05:00 committed by Alexandre Julliard
parent 78901fead4
commit 89ecfe19ca
2 changed files with 4 additions and 4 deletions

View file

@ -72,7 +72,7 @@ static ULONG WINAPI IDirectMusic8Impl_Release(LPDIRECTMUSIC8 iface)
TRACE("(%p)->(): new ref = %u\n", This, ref);
if (!ref) {
IReferenceClock_Release(&This->master_clock->IReferenceClock_iface);
IReferenceClock_Release(This->master_clock);
if (This->dsound)
IDirectSound_Release(This->dsound);
HeapFree(GetProcessHeap(), 0, This->system_ports);
@ -246,9 +246,9 @@ static HRESULT WINAPI IDirectMusic8Impl_GetMasterClock(LPDIRECTMUSIC8 iface, LPG
TRACE("(%p)->(%p, %p)\n", This, guid_clock, reference_clock);
if (guid_clock)
*guid_clock = This->master_clock->pClockInfo.guidClock;
*guid_clock = GUID_NULL;
if (reference_clock) {
*reference_clock = &This->master_clock->IReferenceClock_iface;
*reference_clock = This->master_clock;
IReferenceClock_AddRef(*reference_clock);
}

View file

@ -111,7 +111,7 @@ struct IDirectMusic8Impl {
IDirectMusic8 IDirectMusic8_iface;
LONG ref;
IDirectSound *dsound;
IReferenceClockImpl *master_clock;
IReferenceClock *master_clock;
IDirectMusicPort **ports;
int num_ports;
port_info *system_ports;