[Scummvm-cvs-logs] SF.net SVN: scummvm: [24007] scummvm/trunk/engines/simon

kirben at users.sourceforge.net kirben at users.sourceforge.net
Fri Sep 29 08:59:06 CEST 2006


Revision: 24007
          http://svn.sourceforge.net/scummvm/?rev=24007&view=rev
Author:   kirben
Date:     2006-09-28 23:58:59 -0700 (Thu, 28 Sep 2006)

Log Message:
-----------
PP uses voice channel for looping music

Modified Paths:
--------------
    scummvm/trunk/engines/simon/sound.cpp
    scummvm/trunk/engines/simon/sound.h
    scummvm/trunk/engines/simon/vga.cpp

Modified: scummvm/trunk/engines/simon/sound.cpp
===================================================================
--- scummvm/trunk/engines/simon/sound.cpp	2006-09-29 06:24:12 UTC (rev 24006)
+++ scummvm/trunk/engines/simon/sound.cpp	2006-09-29 06:58:59 UTC (rev 24007)
@@ -484,8 +484,9 @@
 		return;
 
 	_mixer->stopHandle(_voiceHandle);
-	if (_vm->getGameType() == GType_FF || _vm->getGameType() == GType_PP ||
-		_vm->getGameId() == GID_SIMON1CD32) {
+	if (_vm->getGameType() == GType_PP) {
+		_voice->playSound(sound, &_voiceHandle, Audio::Mixer::FLAG_LOOP);
+	} else if (_vm->getGameType() == GType_FF || _vm->getGameId() == GID_SIMON1CD32) {
 		_voice->playSound(sound, &_voiceHandle, 0);
 	} else {
 		_voice->playSound(sound, &_voiceHandle, Audio::Mixer::FLAG_UNSIGNED);
@@ -526,6 +527,13 @@
 	return _mixer->isSoundHandleActive(_voiceHandle);
 }
 
+void Sound::stopAllSfx() {
+	_mixer->stopHandle(_ambientHandle);
+	_mixer->stopHandle(_effectsHandle);
+	_mixer->stopHandle(_sfx5Handle);
+	_ambientPlaying = 0;
+}
+
 void Sound::stopVoice() {
 	_mixer->stopHandle(_voiceHandle);
 }

Modified: scummvm/trunk/engines/simon/sound.h
===================================================================
--- scummvm/trunk/engines/simon/sound.h	2006-09-29 06:24:12 UTC (rev 24006)
+++ scummvm/trunk/engines/simon/sound.h	2006-09-29 06:58:59 UTC (rev 24007)
@@ -85,6 +85,7 @@
 
 	bool hasVoice() const;
 	bool isVoiceActive() const;
+	void stopAllSfx();
 	void stopSfx5();
 	void stopVoice();
 	void stopAll();

Modified: scummvm/trunk/engines/simon/vga.cpp
===================================================================
--- scummvm/trunk/engines/simon/vga.cpp	2006-09-29 06:24:12 UTC (rev 24006)
+++ scummvm/trunk/engines/simon/vga.cpp	2006-09-29 06:58:59 UTC (rev 24007)
@@ -1796,7 +1796,10 @@
 }
 
 void SimonEngine::vc29_stopAllSounds() {
-	_sound->stopAll();
+	if (getGameType() != GType_PP)
+		_sound->stopVoice();
+
+	_sound->stopAllSfx();
 }
 
 void SimonEngine::vc30_setFrameRate() {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list