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>
This commit is contained in:
parent
1370449db8
commit
2233fb3718
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue