mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
dsound: Consolidate some duplicate code.
This commit is contained in:
parent
ca1d074c50
commit
b6fcb20433
@ -380,17 +380,9 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface)
|
||||
DirectSoundDevice_RemoveBuffer(This->device, This);
|
||||
RtlDeleteResource(&This->lock);
|
||||
|
||||
if (This->hwbuf) {
|
||||
if (This->hwbuf)
|
||||
IDsDriverBuffer_Release(This->hwbuf);
|
||||
if (This->device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY) {
|
||||
This->buffer->ref--;
|
||||
list_remove(&This->entry);
|
||||
if (This->buffer->ref==0) {
|
||||
HeapFree(GetProcessHeap(),0,This->buffer->memory);
|
||||
HeapFree(GetProcessHeap(),0,This->buffer);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!This->hwbuf || (This->device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY)) {
|
||||
This->buffer->ref--;
|
||||
list_remove(&This->entry);
|
||||
if (This->buffer->ref==0) {
|
||||
|
Loading…
Reference in New Issue
Block a user