[Scummvm-cvs-logs] CVS: scummvm/saga scene.cpp,1.143,1.144 sound.cpp,1.32,1.33 sound.h,1.24,1.25

Eugene Sandulenko sev at users.sourceforge.net
Fri Aug 12 18:36:14 CEST 2005


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

Modified Files:
	scene.cpp sound.cpp sound.h 
Log Message:
Fix bug #1257542 "ITE: Sounds do not stop after quitting scene". Though
There is a big problem in sound code. It is written with only one SFX and
only one Voice playing at the same time in mind which is not the case. This
should be rewritten so there are more than 2 sound handles.


Index: scene.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/scene.cpp,v
retrieving revision 1.143
retrieving revision 1.144
diff -u -d -r1.143 -r1.144
--- scene.cpp	10 Aug 2005 15:31:15 -0000	1.143
+++ scene.cpp	13 Aug 2005 01:35:51 -0000	1.144
@@ -812,8 +812,7 @@
 			_vm->_interface->setMode(kPanelMain);
 		}
 
-		_vm->_sound->stopVoice();
-		_vm->_sound->stopSound();
+		_vm->_sound->stopAll();
 
 		if (_sceneDescription.musicResourceId >= 0) {
 			event.type = kEvTOneshot;

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sound.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- sound.cpp	29 Jul 2005 17:58:00 -0000	1.32
+++ sound.cpp	13 Aug 2005 01:35:52 -0000	1.33
@@ -92,4 +92,8 @@
 	_mixer->stopHandle(_voiceHandle);
 }
 
+void Sound::stopAll() {
+	_mixer->stopAll();
+}
+
 } // End of namespace Saga

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sound.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- sound.h	30 Jul 2005 21:11:21 -0000	1.24
+++ sound.h	13 Aug 2005 01:35:52 -0000	1.25
@@ -61,6 +61,8 @@
 	void resumeVoice();
 	void stopVoice();
 
+	void stopAll();
+
  private:
 
 	void playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume, bool loop);





More information about the Scummvm-git-logs mailing list