[Scummvm-cvs-logs] CVS: scummvm/simon sound.cpp,1.3,1.4 sound.h,1.1,1.2

Oliver Kiehl olki at users.sourceforge.net
Sat Dec 7 09:36:05 CET 2002


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv2861

Modified Files:
	sound.cpp sound.h 
Log Message:
added function to interrupt voice


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sound.cpp	1 Dec 2002 08:02:35 -0000	1.3
+++ sound.cpp	7 Dec 2002 17:35:33 -0000	1.4
@@ -117,7 +117,7 @@
 	if (!_voice)
 		return;
 	
-	_voice->playSound(sound, &_voice_handle);
+	_voice_index = _voice->playSound(sound, &_voice_handle);
 }
 
 void SimonSound::playEffects(uint sound)
@@ -153,6 +153,11 @@
 bool SimonSound::hasVoice()
 {
 	return _voice != NULL;
+}
+
+void SimonSound::stopVoice()
+{
+	_mixer->stop(_voice_index);
 }
 
 void SimonSound::stopAll()

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sound.h	29 Nov 2002 22:09:52 -0000	1.1
+++ sound.h	7 Dec 2002 17:35:34 -0000	1.2
@@ -52,6 +52,7 @@
 	};
 
 	byte _game;
+	int _voice_index;
 	int _ambient_index;
 	SoundMixer *_mixer;
 
@@ -78,6 +79,7 @@
 	void playAmbient(uint sound);
 
 	bool hasVoice();
+	void stopVoice();
 	void stopAll();
 	void effectsPause(bool b);
 	void ambientPause(bool b);





More information about the Scummvm-git-logs mailing list