Commit 8ba03f8a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmsynth: Lock/unlock the module only on creation/desctruction.

parent 6f440bba
......@@ -72,8 +72,6 @@ static ULONG WINAPI IDirectMusicSynth8Impl_AddRef(LPDIRECTMUSICSYNTH8 iface)
TRACE("(%p)->(): new ref = %u\n", This, ref);
DMSYNTH_LockModule();
return ref;
}
......@@ -88,10 +86,9 @@ static ULONG WINAPI IDirectMusicSynth8Impl_Release(LPDIRECTMUSICSYNTH8 iface)
if (This->pLatencyClock)
IReferenceClock_Release(This->pLatencyClock);
HeapFree(GetProcessHeap(), 0, This);
DMSYNTH_UnlockModule();
}
DMSYNTH_UnlockModule();
return ref;
}
......@@ -605,7 +602,9 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicSynthImpl(REFIID riid, void **ppobj)
obj->pCaps.dwEffectFlags = DMUS_EFFECT_REVERB;
strcpyW(obj->pCaps.wszDescription, descrW);
DMSYNTH_LockModule();
hr = IDirectMusicSynth8_QueryInterface(&obj->IDirectMusicSynth8_iface, riid, ppobj);
IDirectMusicSynth8_Release(&obj->IDirectMusicSynth8_iface);
return hr;
}
......@@ -67,8 +67,6 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef(LPDIRECTMUSICSYNTHSINK ifac
TRACE("(%p)->(): new ref = %u\n", This, ref);
DMSYNTH_LockModule();
return ref;
}
......@@ -83,10 +81,9 @@ static ULONG WINAPI IDirectMusicSynthSinkImpl_Release(LPDIRECTMUSICSYNTHSINK ifa
if (This->latency_clock)
IReferenceClock_Release(This->latency_clock);
HeapFree(GetProcessHeap(), 0, This);
DMSYNTH_UnlockModule();
}
DMSYNTH_UnlockModule();
return ref;
}
......
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