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

Avoids an unsafe interface to object transition.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Michael Stefaniuc 2017-04-05 15:25:45 +02:00 committed by Alexandre Julliard
parent a6a9ec4459
commit 44fd37a323
2 changed files with 3 additions and 3 deletions

View File

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

View File

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