winepulse: Refactor AudioClient's Release to match other drivers.
This commit is contained in:
parent
5069c2ad90
commit
33685372dd
1 changed files with 7 additions and 5 deletions
|
@ -423,15 +423,17 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface)
|
||||||
ref = InterlockedDecrement(&This->ref);
|
ref = InterlockedDecrement(&This->ref);
|
||||||
TRACE("(%p) Refcount now %lu\n", This, ref);
|
TRACE("(%p) Refcount now %lu\n", This, ref);
|
||||||
if (!ref) {
|
if (!ref) {
|
||||||
if (This->stream) {
|
IAudioClient3_Stop(iface);
|
||||||
stream_release(This->stream, This->timer_thread);
|
IMMDevice_Release(This->parent);
|
||||||
This->stream = 0;
|
IUnknown_Release(This->marshal);
|
||||||
|
if (This->session) {
|
||||||
sessions_lock();
|
sessions_lock();
|
||||||
list_remove(&This->entry);
|
list_remove(&This->entry);
|
||||||
sessions_unlock();
|
sessions_unlock();
|
||||||
}
|
}
|
||||||
IUnknown_Release(This->marshal);
|
free(This->vols);
|
||||||
IMMDevice_Release(This->parent);
|
if (This->stream)
|
||||||
|
stream_release(This->stream, This->timer_thread);
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
}
|
}
|
||||||
return ref;
|
return ref;
|
||||||
|
|
Loading…
Add table
Reference in a new issue