dmsynth: Lock/unlock the module only on creation/desctruction.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6f440bbad5
commit
8ba03f8a98
|
@ -72,8 +72,6 @@ static ULONG WINAPI IDirectMusicSynth8Impl_AddRef(LPDIRECTMUSICSYNTH8 iface)
|
||||||
|
|
||||||
TRACE("(%p)->(): new ref = %u\n", This, ref);
|
TRACE("(%p)->(): new ref = %u\n", This, ref);
|
||||||
|
|
||||||
DMSYNTH_LockModule();
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,10 +86,9 @@ static ULONG WINAPI IDirectMusicSynth8Impl_Release(LPDIRECTMUSICSYNTH8 iface)
|
||||||
if (This->pLatencyClock)
|
if (This->pLatencyClock)
|
||||||
IReferenceClock_Release(This->pLatencyClock);
|
IReferenceClock_Release(This->pLatencyClock);
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
DMSYNTH_UnlockModule();
|
||||||
}
|
}
|
||||||
|
|
||||||
DMSYNTH_UnlockModule();
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,7 +602,9 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl(REFIID riid, void **ppobj)
|
||||||
obj->pCaps.dwEffectFlags = DMUS_EFFECT_REVERB;
|
obj->pCaps.dwEffectFlags = DMUS_EFFECT_REVERB;
|
||||||
strcpyW(obj->pCaps.wszDescription, descrW);
|
strcpyW(obj->pCaps.wszDescription, descrW);
|
||||||
|
|
||||||
|
DMSYNTH_LockModule();
|
||||||
hr = IDirectMusicSynth8_QueryInterface(&obj->IDirectMusicSynth8_iface, riid, ppobj);
|
hr = IDirectMusicSynth8_QueryInterface(&obj->IDirectMusicSynth8_iface, riid, ppobj);
|
||||||
IDirectMusicSynth8_Release(&obj->IDirectMusicSynth8_iface);
|
IDirectMusicSynth8_Release(&obj->IDirectMusicSynth8_iface);
|
||||||
|
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,8 +67,6 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef(LPDIRECTMUSICSYNTHSINK ifac
|
||||||
|
|
||||||
TRACE("(%p)->(): new ref = %u\n", This, ref);
|
TRACE("(%p)->(): new ref = %u\n", This, ref);
|
||||||
|
|
||||||
DMSYNTH_LockModule();
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,10 +81,9 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_Release(LPDIRECTMUSICSYNTHSINK ifa
|
||||||
if (This->latency_clock)
|
if (This->latency_clock)
|
||||||
IReferenceClock_Release(This->latency_clock);
|
IReferenceClock_Release(This->latency_clock);
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
DMSYNTH_UnlockModule();
|
||||||
}
|
}
|
||||||
|
|
||||||
DMSYNTH_UnlockModule();
|
|
||||||
|
|
||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue