dsound: Allow enough space for multi-channel frames.
Andrew Eikum
aeikum at codeweavers.com
Tue Feb 28 08:43:03 CST 2017
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
On Tue, Feb 28, 2017 at 01:37:53PM +0000, Huw Davies wrote:
> Signed-off-by: Huw Davies <huw at codeweavers.com>
> ---
> 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);
> --
> 2.10.2
>
>
>
More information about the wine-patches
mailing list