[Scummvm-cvs-logs] CVS: scummvm/bs2/driver d_sound.cpp,1.35,1.36 d_sound.h,1.8,1.9

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Tue Sep 2 23:28:06 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv6127/driver

Modified Files:
	d_sound.cpp d_sound.h 
Log Message:
Removed fxLooped[], fxCached[] and musCounter[]. They were written to, but
never read.


Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/d_sound.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- d_sound.cpp	3 Sep 2003 06:03:29 -0000	1.35
+++ d_sound.cpp	3 Sep 2003 06:27:25 -0000	1.36
@@ -227,14 +227,11 @@
 	_mixer = mixer;
 	
 	memset(fxId,		0, sizeof(fxId));
-	memset(fxCached,	0, sizeof(fxCached));
 	memset(fxiPaused,	0, sizeof(fxiPaused));
-	memset(fxLooped, 	0, sizeof(fxLooped));
 	memset(fxRate,		0, sizeof(fxRate));
 
  	memset(musStreaming,	0, sizeof(musStreaming));
 	memset(musicPaused,	0, sizeof(musicPaused));
-	memset(musCounter, 	0, sizeof(musCounter));
 	memset(musFading, 	0, sizeof(musFading));
 	memset(musLooping,	0, sizeof(musLooping));
 	memset(musFilePos,	0, sizeof(musFilePos));
@@ -686,7 +683,6 @@
 			bufferFx[fxi][j] = TO_BE_16(bufferFx[fxi][j]);
 
 		fxId[fxi] = id;
-		fxCached[fxi] = RDSE_FXCACHED;
 	}
 	return(RD_OK);
 }
@@ -703,12 +699,11 @@
 	if (soundOn) {
 		if (data == NULL) {
 			if (type == RDSE_FXLEADOUT) {
-				id = 0xffffffff;
+				id = (int32) 0xffffffff;
 				i = GetFxIndex(id);
 				if (i == MAXFX) {
 					return(RDERR_FXNOTOPEN);
 				}
-				fxLooped[i] = 0;
 				flagsFx[i] &= ~SoundMixer::FLAG_LOOP;
 
 				byte volume;
@@ -719,14 +714,11 @@
 					volume = musicVolTable[volMusic[0]];
 				}
 				g_engine->_mixer->playRaw(&soundHandleFx[i], bufferFx[i], bufferSizeFx[i], fxRate[i], flagsFx[i], volume, 0);
-
-				fxCached[i] = RDSE_FXTOCLEAR;
 			} else {
 				i = GetFxIndex(id);
 				if (i == MAXFX) {
 					return(RDERR_FXNOTOPEN);
 				}
-				fxLooped[i] = loop;
 				if (loop == 1)
 					flagsFx[i] |= SoundMixer::FLAG_LOOP;
 				else 
@@ -745,9 +737,6 @@
 				p = panTable[pan + 16];
 
 				g_engine->_mixer->playRaw(&soundHandleFx[i], bufferFx[i], bufferSizeFx[i], fxRate[i], flagsFx[i], volume, p);
-				if (id == (int32) 0xffffffff) {
-					fxCached[i] = RDSE_FXTOCLEAR;
-				}
 			}
 		} else {
 			if (type == RDSE_FXLEADIN) {
@@ -760,8 +749,6 @@
 				if (i == MAXFX) {
 					return RDERR_FXFUCKED;
 				}
-				fxCached[i] = RDSE_FXTOCLEAR;
-
 				flagsFx[i] &= ~SoundMixer::FLAG_LOOP;
 				
 				byte volume;
@@ -781,8 +768,6 @@
 				if (i == MAXFX) {
 					return(RDERR_FXFUCKED);
 				}
-				fxCached[i] = RDSE_FXTOCLEAR;
-				fxLooped[i] = loop;
 				if (loop == 1)
 					flagsFx[i] |= SoundMixer::FLAG_LOOP;
 				else 
@@ -1121,7 +1106,6 @@
 
 	// Recorder some last variables
 	musStreaming[primaryStream] = 1;
-	musCounter[primaryStream] = 250;
 	return RD_OK;
 }
 

Index: d_sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/d_sound.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- d_sound.h	3 Sep 2003 03:57:23 -0000	1.8
+++ d_sound.h	3 Sep 2003 06:27:25 -0000	1.9
@@ -93,9 +93,7 @@
 		int32 DipMusic();
 
 		int32 fxId[MAXFX];
-		uint8 fxCached[MAXFX];
 		uint8 fxiPaused[MAXFX];
-		uint8 fxLooped[MAXFX];
 		uint8 fxVolume[MAXFX];
 		uint16 fxRate[MAXFX];
 		uint32 flagsFx[MAXFX];
@@ -114,7 +112,6 @@
 
 		int16 musStreaming[MAXMUS];
 		int16 musicPaused[MAXMUS];
-		int16 musCounter[MAXMUS];
 		int16 musFading[MAXMUS];
 		int16 musLooping[MAXMUS];
 





More information about the Scummvm-git-logs mailing list