Erich E. Hoover : dsound: Clear the temporary mixing buffer after allocation.

Alexandre Julliard julliard at winehq.org
Mon Feb 6 16:31:20 CST 2017


Module: wine
Branch: master
Commit: b7118753f41832fe40a0e3f75b123f51e7364ba8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b7118753f41832fe40a0e3f75b123f51e7364ba8

Author: Erich E. Hoover <erich.e.hoover at wine-staging.com>
Date:   Mon Dec 19 14:17:23 2016 -0700

dsound: Clear the temporary mixing buffer after allocation.

Signed-off-by: Erich E. Hoover <erich.e.hoover at wine-staging.com>
Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dsound/mixer.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 309c338..2550753 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -428,6 +428,8 @@ static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames)
 		else
 			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);
 
@@ -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 */
 	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);
 	ibuf = dsb->device->tmp_buffer;
 




More information about the wine-cvs mailing list