dsound: Allow enough space for multi-channel frames.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Huw Davies 2017-02-28 13:37:53 +00:00 committed by Alexandre Julliard
parent 1370449db8
commit 2233fb3718
1 changed files with 1 additions and 1 deletions

View File

@ -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);