Andrew Eikum : winmm: Use buffer offset when recording.

Alexandre Julliard julliard at winehq.org
Wed Oct 12 14:31:17 CDT 2011


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

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Tue Oct 11 15:32:17 2011 -0500

winmm: Use buffer offset when recording.

---

 dlls/winmm/waveform.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
index 372501c..7110f25 100644
--- a/dlls/winmm/waveform.c
+++ b/dlls/winmm/waveform.c
@@ -1587,7 +1587,8 @@ static void WID_PullData(WINMM_Device *device)
             to_copy_bytes = min(packet * device->bytes_per_frame,
                     queue->dwBufferLength - queue->dwBytesRecorded);
 
-            memcpy(queue->lpData + queue->dwBytesRecorded, data,
+            memcpy(queue->lpData + queue->dwBytesRecorded,
+                    data + (packet_len - packet) * device->bytes_per_frame,
                     to_copy_bytes);
 
             queue->dwBytesRecorded += to_copy_bytes;




More information about the wine-cvs mailing list