dsound: Don't free buffer if it's owned by alsa.

This commit is contained in:
Dan Kegel 2008-06-20 05:49:15 -07:00 committed by Alexandre Julliard
parent 64a62d2e8f
commit 025457e09b
1 changed files with 2 additions and 1 deletions

View File

@ -1282,7 +1282,8 @@ ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
HeapFree(GetProcessHeap(), 0, device->tmp_buffer); HeapFree(GetProcessHeap(), 0, device->tmp_buffer);
HeapFree(GetProcessHeap(), 0, device->mix_buffer); HeapFree(GetProcessHeap(), 0, device->mix_buffer);
HeapFree(GetProcessHeap(), 0, device->buffer); if (device->drvdesc.dwFlags & DSDDESC_USESYSTEMMEMORY)
HeapFree(GetProcessHeap(), 0, device->buffer);
RtlDeleteResource(&device->buffer_list_lock); RtlDeleteResource(&device->buffer_list_lock);
device->mixlock.DebugInfo->Spare[0] = 0; device->mixlock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&device->mixlock); DeleteCriticalSection(&device->mixlock);