From 9f40a12ed6de3aa6a85da356f0a1c7a200325262 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Fri, 23 Jul 2004 22:58:59 +0000 Subject: [PATCH] Small cleanup in IDirectSoundBufferImpl_SetPan(). --- dlls/dsound/buffer.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c index bf87a4cb2fa..310d2c30a17 100644 --- a/dlls/dsound/buffer.c +++ b/dlls/dsound/buffer.c @@ -737,7 +737,6 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetPan( ) { HRESULT hres = DS_OK; ICOM_THIS(IDirectSoundBufferImpl,iface); - LONG oldPan; TRACE("(%p,%ld)\n",This,pan); @@ -756,10 +755,8 @@ static HRESULT WINAPI IDirectSoundBufferImpl_SetPan( /* **** */ 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) {