[Scummvm-cvs-logs] CVS: scummvm/kyra kyra.cpp,1.118,1.119 sound.cpp,1.12,1.13

Johannes Schickel lordhoto at users.sourceforge.net
Thu Jan 12 07:39:04 CET 2006


Update of /cvsroot/scummvm/scummvm/kyra
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4537

Modified Files:
	kyra.cpp sound.cpp 
Log Message:
Fixed some issues with fading sound.


Index: kyra.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.cpp,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -d -r1.118 -r1.119
--- kyra.cpp	12 Jan 2006 14:53:23 -0000	1.118
+++ kyra.cpp	12 Jan 2006 15:38:04 -0000	1.119
@@ -1763,9 +1763,6 @@
 	} else {
 		_lastMusicCommand = 1;
 		_midi->beginFadeOut();
-		while (_midi->fadeOut()) {
-			_system->delayMillis(10);
-		}
 	}
 }
 

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/sound.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- sound.cpp	12 Jan 2006 13:16:42 -0000	1.12
+++ sound.cpp	12 Jan 2006 15:38:04 -0000	1.13
@@ -234,6 +234,10 @@
 		_parser = 0;
 		delete [] _parserSource;
 		_parserSource = 0;
+		
+		_fadeStartTime = 0;
+		_fadeMusicOut = false;
+		setVolume(255);
 	}
 }
 
@@ -263,6 +267,17 @@
 		music->_fadeMusicOut = false;
 		music->_isLooping = false;
 		music->_isPlaying = false;
+		
+		music->_eventFromMusic = true;
+		// from sound/midiparser.cpp
+		for (int i = 0; i < 128; ++i) {
+			for (int j = 0; j < 16; ++j) {
+				music->send(0x80 | j | i << 8);
+			}
+		}
+		for (int i = 0; i < 16; ++i) {
+			music->send(0x007BB0 | i);
+		}
 	}
 
 	if (music->_isPlaying) {





More information about the Scummvm-git-logs mailing list