forked from Mirrors/wine-wine
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
parent
a6a9ec4459
commit
44fd37a323
|
@ -66,7 +66,7 @@ struct IDirectMusicSynth8Impl {
|
|||
DMUS_PORTCAPS pCaps;
|
||||
BOOL fActive;
|
||||
IReferenceClock* pLatencyClock;
|
||||
IDirectMusicSynthSinkImpl* pSynthSink;
|
||||
IDirectMusicSynthSink *synth_sink;
|
||||
};
|
||||
|
||||
/*****************************************************************************
|
||||
|
|
|
@ -310,7 +310,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_GetLatencyClock(LPDIRECTMUSICSYNTH8
|
|||
if (!clock)
|
||||
return E_POINTER;
|
||||
|
||||
if (!This->pSynthSink)
|
||||
if (!This->synth_sink)
|
||||
return DMUS_E_NOSYNTHSINK;
|
||||
|
||||
*clock = This->pLatencyClock;
|
||||
|
@ -336,7 +336,7 @@ static HRESULT WINAPI IDirectMusicSynth8Impl_SetSynthSink(LPDIRECTMUSICSYNTH8 if
|
|||
|
||||
TRACE("(%p)->(%p)\n", iface, synth_sink);
|
||||
|
||||
This->pSynthSink = (IDirectMusicSynthSinkImpl*)synth_sink;
|
||||
This->synth_sink = synth_sink;
|
||||
|
||||
if (synth_sink)
|
||||
return IDirectMusicSynthSink_GetLatencyClock(synth_sink, &This->pLatencyClock);
|
||||
|
|
Loading…
Reference in New Issue