[PATCH 12/13] dsound: Removed conflicting ZeroMemory()/FillMemory() calls. ZeroMemory() replaced with FillMemory() to handle 8-bit buffers better. (resend)
Krzysztof Nikiel
knik00 at gmail.com
Fri Feb 11 05:53:08 CST 2011
---
dlls/dsound/mixer.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 4a0b60e..3542bdb 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -377,15 +377,12 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
/* reset mix position to write position */
device->mixpos = writepos;
- ZeroMemory(device->mix_buffer, device->mix_buffer_len);
- ZeroMemory(device->buffer, device->buflen);
+ FillMemory(device->buffer, device->buflen, nfiller);
} else if (playpos < device->playpos) {
buf1 = device->buffer + device->playpos;
buf2 = device->buffer;
size1 = device->buflen - device->playpos;
size2 = playpos;
- FillMemory(device->mix_buffer + mixplaypos, device->mix_buffer_len
- mixplaypos, 0);
- FillMemory(device->mix_buffer, mixplaypos2, 0);
if (lock)
IDsDriverBuffer_Lock(device->hwbuf, &buf1, &size1, &buf2, &size2,
device->playpos, size1+size2, 0);
FillMemory(buf1, size1, nfiller);
@@ -399,7 +396,6 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
buf2 = NULL;
size1 = playpos - device->playpos;
size2 = 0;
- FillMemory(device->mix_buffer + mixplaypos, mixplaypos2 - mixplaypos, 0);
if (lock)
IDsDriverBuffer_Lock(device->hwbuf, &buf1, &size1, &buf2, &size2,
device->playpos, size1+size2, 0);
FillMemory(buf1, size1, nfiller);
--
1.7.2.3
More information about the wine-patches
mailing list