Commit 2233fb37 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

dsound: Allow enough space for multi-channel frames.

parent 1370449d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment