Huw Davies : dsound: Allow enough space for multi-channel frames.

Alexandre Julliard julliard at winehq.org
Tue Feb 28 15:27:04 CST 2017


Module: wine
Branch: master
Commit: 2233fb371825bf65cb0aa9711bb8c8bc6129be88
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2233fb371825bf65cb0aa9711bb8c8bc6129be88

Author: Huw Davies <huw at codeweavers.com>
Date:   Tue Feb 28 13:37:53 2017 +0000

dsound: Allow enough space for multi-channel frames.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dsound/primary.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index b10ba02..87b7e8e 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -240,7 +240,7 @@ static HRESULT DSOUND_PrimaryOpen(DirectSoundDevice *device, WAVEFORMATEX *wfx,
     /* reallocate emulated primary buffer */
     if (forcewave || !mixfloat) {
         if (!forcewave)
-            new_buflen = frames * sizeof(float);
+            new_buflen = frames * wfx->nChannels * sizeof(float);
 
         if (device->buffer)
             newbuf = HeapReAlloc(GetProcessHeap(), 0, device->buffer, new_buflen);




More information about the wine-cvs mailing list