Commit 44fd37a3 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmsynth: Don't store a SynthSink implementation in IDirectMusicSynth8Impl.

Avoids an unsafe interface to object transition. Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a6a9ec44
...@@ -66,7 +66,7 @@ struct IDirectMusicSynth8Impl { ...@@ -66,7 +66,7 @@ struct IDirectMusicSynth8Impl {
DMUS_PORTCAPS pCaps; DMUS_PORTCAPS pCaps;
BOOL fActive; BOOL fActive;
IReferenceClock* pLatencyClock; IReferenceClock* pLatencyClock;
IDirectMusicSynthSinkImpl* pSynthSink; IDirectMusicSynthSink *synth_sink;
}; };
/***************************************************************************** /*****************************************************************************
......
...@@ -310,7 +310,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock(LPDIRECTMUSICSYNTH8 ...@@ -310,7 +310,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock(LPDIRECTMUSICSYNTH8
if (!clock) if (!clock)
return E_POINTER; return E_POINTER;
if (!This->pSynthSink) if (!This->synth_sink)
return DMUS_E_NOSYNTHSINK; return DMUS_E_NOSYNTHSINK;
*clock = This->pLatencyClock; *clock = This->pLatencyClock;
...@@ -336,7 +336,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink(LPDIRECTMUSICSYNTH8 if ...@@ -336,7 +336,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink(LPDIRECTMUSICSYNTH8 if
TRACE("(%p)->(%p)\n", iface, synth_sink); TRACE("(%p)->(%p)\n", iface, synth_sink);
This->pSynthSink = (IDirectMusicSynthSinkImpl*)synth_sink; This->synth_sink = synth_sink;
if (synth_sink) if (synth_sink)
return IDirectMusicSynthSink_GetLatencyClock(synth_sink, &This->pLatencyClock); return IDirectMusicSynthSink_GetLatencyClock(synth_sink, &This->pLatencyClock);
......
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