Huw Davies : dsound: Allow enough space for multi-channel frames.
Module: wine Branch: master Commit: 2233fb371825bf65cb0aa9711bb8c8bc6129be88 URL: http://source.winehq.org/git/wine.git/?a=commit;h=2233fb371825bf65cb0aa9711b... Author: Huw Davies <huw(a)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(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)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);
participants (1)
-
Alexandre Julliard