Maarten Lankhorst : dsound: Fix locking in mixer.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jul 30 16:52:31 CDT 2007
Module: wine
Branch: master
Commit: a335f68bfba761c61f6678d389eb70e78240b9fb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a335f68bfba761c61f6678d389eb70e78240b9fb
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Sun Jul 29 21:27:41 2007 +0200
dsound: Fix locking in mixer.
---
dlls/dsound/mixer.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 1e40305..12243fe 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -891,7 +891,7 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
}
if (lock)
- IDsDriverBuffer_Lock(device->hwbuf, &buf1, &size1, &buf2, &size2, device->mixpos, maxq, 0);
+ IDsDriverBuffer_Lock(device->hwbuf, &buf1, &size1, &buf2, &size2, writepos, maxq, 0);
/* do the mixing */
frag = DSOUND_MixToPrimary(device, writepos, maxq, recover, &all_stopped);
@@ -960,9 +960,11 @@ static void DSOUND_PerformMix(DirectSoundDevice *device)
} else {
/* update the wave queue if using wave system */
- if(device->hwbuf == NULL){
+ if(device->hwbuf == NULL)
DSOUND_WaveQueue(device, TRUE);
- }
+ else
+ /* Keep alsa happy, which needs GetPosition called once every 10 ms */
+ IDsDriverBuffer_GetPosition(device->hwbuf, NULL, NULL);
/* in the DSSCL_WRITEPRIMARY mode, the app is totally in charge... */
if (device->state == STATE_STARTING) {
More information about the wine-cvs
mailing list