dsound: Clear the temporary mixing buffer after allocation.
Signed-off-by: Erich E. Hoover <erich.e.hoover@wine-staging.com> Signed-off-by: Andrew Eikum <aeikum@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
054f1e8c1a
commit
b7118753f4
|
@ -428,6 +428,8 @@ static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
|
||||||
else
|
else
|
||||||
dsb->device->tmp_buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes);
|
dsb->device->tmp_buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes);
|
||||||
}
|
}
|
||||||
|
if(dsb->put_aux == putieee32_sum)
|
||||||
|
memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
|
||||||
|
|
||||||
cp_fields(dsb, frames, &dsb->freqAccNum);
|
cp_fields(dsb, frames, &dsb->freqAccNum);
|
||||||
|
|
||||||
|
@ -506,9 +508,6 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, float *mix_buffer,
|
||||||
|
|
||||||
/* Resample buffer to temporary buffer specifically allocated for this purpose, if needed */
|
/* Resample buffer to temporary buffer specifically allocated for this purpose, if needed */
|
||||||
oldpos = dsb->sec_mixpos;
|
oldpos = dsb->sec_mixpos;
|
||||||
|
|
||||||
if(dsb->put_aux == putieee32_sum)
|
|
||||||
memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len);
|
|
||||||
DSOUND_MixToTemporary(dsb, frames);
|
DSOUND_MixToTemporary(dsb, frames);
|
||||||
ibuf = dsb->device->tmp_buffer;
|
ibuf = dsb->device->tmp_buffer;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue