Minor cleanup in IDirectSoundBufferImpl_SetPan()

Francois Gouget fgouget at codeweavers.com
Fri Jul 23 12:48:32 CDT 2004


Changelog:

  * dlls/dsound/buffer.c

    Francois Gouget <fgouget at codeweavers.com>
    Small cleanup in IDirectSoundBufferImpl_SetPan().

-- 
Francois Gouget
fgouget at codeweavers.com

-------------- next part --------------
Index: dlls/dsound/buffer.c
===================================================================
RCS file: /var/cvs/wine/dlls/dsound/buffer.c,v
retrieving revision 1.25
diff -u -r1.25 buffer.c
--- dlls/dsound/buffer.c	13 Jul 2004 23:35:09 -0000	1.25
+++ dlls/dsound/buffer.c	21 Jul 2004 11:14:53 -0000
@@ -737,7 +737,6 @@
 ) {
 	HRESULT hres = DS_OK;
 	ICOM_THIS(IDirectSoundBufferImpl,iface);
-	LONG oldPan;
 
 	TRACE("(%p,%ld)\n",This,pan);
 
@@ -756,10 +755,8 @@
 	/* **** */
 	EnterCriticalSection(&(This->lock));
 
-	oldPan = This->volpan.lPan;
-	This->volpan.lPan = pan;
-
-	if (pan != oldPan) {
+	if (This->volpan.lPan != pan) {
+		This->volpan.lPan = pan;
 		DSOUND_RecalcVolPan(&(This->volpan));
 
 		if (This->hwbuf) {


More information about the wine-patches mailing list