Maarten Lankhorst : dsound: Clean up some unused variables.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 6 12:59:09 CDT 2007


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

Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date:   Fri Jul  6 15:34:33 2007 +0200

dsound: Clean up some unused variables.

---

 dlls/dsound/buffer.c         |    2 +-
 dlls/dsound/dsound_main.c    |   17 -----------------
 dlls/dsound/dsound_private.h |    2 --
 dlls/dsound/mixer.c          |    6 +++---
 4 files changed, 4 insertions(+), 23 deletions(-)

diff --git a/dlls/dsound/buffer.c b/dlls/dsound/buffer.c
index 9de2a39..7a45679 100644
--- a/dlls/dsound/buffer.c
+++ b/dlls/dsound/buffer.c
@@ -503,7 +503,7 @@ static HRESULT WINAPI IDirectSoundBufferImpl_GetCurrentPosition(
 				 * behind write cursor, hmm... */
 				/* let's just do what might work for Half-Life */
 				DWORD wp;
-				wp = (This->device->pwplay + ds_hel_margin) * This->device->fraglen;
+				wp = (This->device->pwplay + This->device->prebuf) * This->device->fraglen;
 				wp %= This->device->buflen;
 				*playpos = DSOUND_CalcPlayPosition(This, wp, pwrite);
 				TRACE("Using non-GETCURRENTPOSITION2\n");
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index 483d51b..791dd30 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -61,11 +61,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(dsound);
 /* some stuff may get more responsive with lower values though... */
 #define DS_EMULDRIVER 0 /* some games (Quake 2, UT) refuse to accept
 				emulated dsound devices. set to 0 ! */
-#define DS_HEL_MARGIN 2 /* HEL only: number of waveOut fragments ahead to mix in new buffers
-			 * (keep this close or equal to DS_HEL_QUEUE for best results) */
-#define DS_HEL_QUEUE  2 /* HEL only: number of waveOut fragments ahead to queue to driver
-			 * (this will affect HEL sound reliability and latency) */
-
 #define DS_SND_QUEUE_MAX 10 /* max number of fragments to prebuffer */
 
 DirectSoundDevice*	DSOUND_renderer[MAXWAVEDRIVERS];
@@ -100,8 +95,6 @@ HRESULT mmErr(UINT err)
 }
 
 int ds_emuldriver = DS_EMULDRIVER;
-int ds_hel_margin = DS_HEL_MARGIN;
-int ds_hel_queue = DS_HEL_QUEUE;
 int ds_snd_queue_max = DS_SND_QUEUE_MAX;
 int ds_hw_accel = DS_HW_ACCEL_FULL;
 int ds_default_playback = 0;
@@ -159,12 +152,6 @@ void setup_dsound_options(void)
     if (!get_config_key( hkey, appkey, "EmulDriver", buffer, MAX_PATH ))
         ds_emuldriver = strcmp(buffer, "N");
 
-    if (!get_config_key( hkey, appkey, "HELmargin", buffer, MAX_PATH ))
-        ds_hel_margin = atoi(buffer);
-
-    if (!get_config_key( hkey, appkey, "HELqueue", buffer, MAX_PATH ))
-        ds_hel_queue = atoi(buffer);
-
     if (!get_config_key( hkey, appkey, "SndQueueMax", buffer, MAX_PATH ))
         ds_snd_queue_max = atoi(buffer);
 
@@ -196,10 +183,6 @@ void setup_dsound_options(void)
 
     if (ds_emuldriver != DS_EMULDRIVER )
        WARN("ds_emuldriver = %d (default=%d)\n",ds_emuldriver, DS_EMULDRIVER);
-    if (ds_hel_margin != DS_HEL_MARGIN )
-       WARN("ds_hel_margin = %d (default=%d)\n",ds_hel_margin, DS_HEL_MARGIN );
-    if (ds_hel_queue != DS_HEL_QUEUE )
-       WARN("ds_hel_queue = %d (default=%d)\n",ds_hel_queue, DS_HEL_QUEUE );
     if (ds_snd_queue_max != DS_SND_QUEUE_MAX)
        WARN("ds_snd_queue_max = %d (default=%d)\n",ds_snd_queue_max ,DS_SND_QUEUE_MAX);
     if (ds_hw_accel != DS_HW_ACCEL_FULL)
diff --git a/dlls/dsound/dsound_private.h b/dlls/dsound/dsound_private.h
index 42437a2..56fbd0c 100644
--- a/dlls/dsound/dsound_private.h
+++ b/dlls/dsound/dsound_private.h
@@ -34,8 +34,6 @@
 #define DS_HW_ACCEL_EMULATION   3
 
 extern int ds_emuldriver;
-extern int ds_hel_margin;
-extern int ds_hel_queue;
 extern int ds_snd_queue_max;
 extern int ds_hw_accel;
 extern int ds_default_playback;
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 98dfe52..96c7c42 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -286,7 +286,7 @@ static INT DSOUND_MixerNorm(IDirectSoundBufferImpl *dsb, BYTE *buf, INT len)
 	/* New PerfectPitch(tm) Technology (c) 1998 Rob Riggs */
 	/* Patent Pending :-] */
 
-	/* Patent enhancements (c) 2000 Ove Kåven,
+	/* Patent enhancements (c) 2000 Ove K�ven,
 	 * TransGaming Technologies Inc. */
 
 	/* FIXME("(%p) Adjusting frequency: %ld -> %ld (need optimization)\n",
@@ -749,8 +749,8 @@ static void DSOUND_WaveQueue(DirectSoundDevice *device, BOOL force)
 	/* calculte the current wave write position */
 	wave_writepos = wave_fragpos * device->fraglen;
 
-	TRACE("wave_fragpos = %i, wave_writepos = %i, pwqueue = %i, ds_hel_queue= %i\n",
-		wave_fragpos, wave_writepos, device->pwqueue, ds_hel_queue);
+	TRACE("wave_fragpos = %i, wave_writepos = %i, pwqueue = %i, prebuf = %i\n",
+		wave_fragpos, wave_writepos, device->pwqueue, device->prebuf);
 
 	if(force == FALSE){
 		/* check remaining prebuffered frags */




More information about the wine-cvs mailing list