dsound: Recalculate 3d buffer on SetVolume
Maarten Lankhorst
m.b.lankhorst at gmail.com
Sat Jun 2 09:11:18 CDT 2007
3d buffer has to be recalculated when volume changes.
Thanks to Peter Don Tychsen for reporting this.
-------------- next part --------------
>From 2118a03cb41cd191cd819b307f881c40bad40bec Mon Sep 17 00:00:00 2001
From: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Wed, 30 May 2007 18:31:21 +0200
Subject: [PATCH] dsound: Recalculate 3d buffer on SetVolume
---
dlls/dsound/buffer.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 4431212..0eb1ac1 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -293,6 +293,9 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetVolume(
if (This->dsbd.dwFlags & DSBCAPS_CTRL3D) {
oldVol = This->ds3db_lVolume;
This->ds3db_lVolume = vol;
+ if (vol != oldVol)
+ /* recalc 3d volume, which in turn recalcs the pans */
+ DSOUND_Calc3DBuffer(This);
} else {
oldVol = This->volpan.lVolume;
This->volpan.lVolume = vol;
--
1.4.4.2
More information about the wine-patches
mailing list