[Scummvm-cvs-logs] CVS: scummvm/bs2 sound.cpp,1.7,1.8 sword2.cpp,1.10,1.11

Jonathan Gray khalek at users.sourceforge.net
Fri Aug 1 19:32:02 CEST 2003


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

Modified Files:
	sound.cpp sword2.cpp 
Log Message:
patch #781530 Initial work on StreamCompMusic() by erik

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sound.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sound.cpp	30 Jul 2003 19:25:29 -0000	1.7
+++ sound.cpp	2 Aug 2003 02:31:36 -0000	1.8
@@ -415,7 +415,7 @@
 	else
 		sprintf(filename,"%sCLUSTERS\\MUSIC.CLU", res_man.GetCdPath());
 
-	rv = g_sword2->_sound->StreamCompMusic(filename, params[0], loopFlag);
+	rv = g_sword2->_sound->StreamCompMusic(filename, g_sword2->getGameDataPath(), params[0], loopFlag);
 
 	#ifdef _SWORD2_DEBUG
 		if (rv)

Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sword2.cpp	31 Jul 2003 15:24:23 -0000	1.10
+++ sword2.cpp	2 Aug 2003 02:31:36 -0000	1.11
@@ -106,6 +106,14 @@
 	g_sword2 = this;
 	_features = detector->_game.features;
 	_gameId = detector->_game.id;
+
+	// Setup mixer
+	if (!_mixer->bindToSystem(syst))
+		warning("Sound initialization failed");
+
+	_mixer->setVolume(kDefaultSFXVolume * kDefaultMasterVolume / 255);
+
+	_sound = new Sword2Sound(_mixer);
 }
 
 
@@ -166,8 +174,6 @@
 	Zdebug("CALLING: Init_event_system");
 	Init_event_system();
 	Zdebug("RETURNED.");
-	
-	_sound = new Sword2Sound;
 	
 	Zdebug("CALLING: Init_fx_queue");
 	Init_fx_queue();			// initialise the sound fx queue





More information about the Scummvm-git-logs mailing list