[Bug 13723] Sound buffer freed by both winealsa.drv and dsound

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jun 6 07:05:11 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=13723





--- Comment #1 from Dan Kegel <dank at kegel.com>  2008-06-06 07:05:10 ---
Maarten says "If it was created with USESYSTEMMEMORY, then dsound created the
buffer, if not, alsa owns it."

OK.  Patch sent.  Here's a copy for review, since the archive seems slow:

diff -u a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c
@@ -1282,7 +1282,8 @@ ULONG DirectSoundDevice_Release(DirectSoundDevice *
device)

         HeapFree(GetProcessHeap(), 0, device->tmp_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);
         device->mixlock.DebugInfo->Spare[0] = 0;
         DeleteCriticalSection(&device->mixlock);

I'm no expert, but hey, it worked...


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list