[Scummvm-git-logs] scummvm master -> afe8a2bb3187d6f041c992f2bde1817a55c3db29

sev- sev at scummvm.org
Tue Nov 29 18:45:21 CET 2016


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dd4f48f4d7 FULLPIPE: Unstub StopAllSoundStreams()
5d45f740d3 FULLPIPE: Implement track looping in sceneFinal
a6d2feb8c4 FULLPIPE: Unstub setSceneMusicParameters()
afe8a2bb31 FULLPIPE: Fix sound in scene04


Commit: dd4f48f4d79f68e10511a334efd163a8058c0e5a
    https://github.com/scummvm/scummvm/commit/dd4f48f4d79f68e10511a334efd163a8058c0e5a
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-11-29T18:45:04+01:00

Commit Message:
FULLPIPE: Unstub StopAllSoundStreams()

Changed paths:
    engines/fullpipe/sound.cpp


diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index cc0bf13..504ea0c 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -386,12 +386,10 @@ void FullpipeEngine::startSoundStream1(const char *trackName) {
 }
 
 void FullpipeEngine::stopAllSounds() {
-	_mixer->stopHandle(*_soundStream1);
-	_mixer->stopHandle(*_soundStream2);
-	_mixer->stopHandle(*_soundStream3);
-	_mixer->stopHandle(*_soundStream4);
-
-	_stream2playing = false;
+	for (int i = 0; i < _currSoundListCount; i++)
+		for (int j = 0; j < _currSoundList1[i]->getCount(); j++) {
+			_currSoundList1[i]->getSoundByIndex(j)->stop();
+		}
 }
 
 void FullpipeEngine::toggleMute() {
@@ -522,10 +520,12 @@ void FullpipeEngine::stopSoundStream2() {
 }
 
 void FullpipeEngine::stopAllSoundStreams() {
-	warning("STUB: stopAllSoundStreams()");
+	_mixer->stopHandle(*_soundStream1);
+	_mixer->stopHandle(*_soundStream2);
+	_mixer->stopHandle(*_soundStream3);
+	_mixer->stopHandle(*_soundStream4);
 
-	// TODO: Differences from stopAllSounds()
-	_mixer->stopAll();
+	_stream2playing = false;
 }
 
 void FullpipeEngine::stopAllSoundInstances(int id) {


Commit: 5d45f740d3be06ca6fa4167e02568f4366967768
    https://github.com/scummvm/scummvm/commit/5d45f740d3be06ca6fa4167e02568f4366967768
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-11-29T18:45:04+01:00

Commit Message:
FULLPIPE: Implement track looping in sceneFinal

Changed paths:
    engines/fullpipe/scenes.cpp
    engines/fullpipe/scenes.h
    engines/fullpipe/scenes/sceneFinal.cpp


diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 5ac25c8..b364908 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -472,6 +472,7 @@ Vars::Vars() {
 	sceneFinal_var01 = 0;
 	sceneFinal_var02 = 0;
 	sceneFinal_var03 = 0;
+	sceneFinal_trackHasStarted = false;
 
 	selector = 0;
 }
diff --git a/engines/fullpipe/scenes.h b/engines/fullpipe/scenes.h
index 918fb72..462edde 100644
--- a/engines/fullpipe/scenes.h
+++ b/engines/fullpipe/scenes.h
@@ -663,6 +663,7 @@ public:
 	int sceneFinal_var01;
 	int sceneFinal_var02;
 	int sceneFinal_var03;
+	bool sceneFinal_trackHasStarted;
 
 	PictureObject *selector;
 };
diff --git a/engines/fullpipe/scenes/sceneFinal.cpp b/engines/fullpipe/scenes/sceneFinal.cpp
index 2180edb..f569306 100644
--- a/engines/fullpipe/scenes/sceneFinal.cpp
+++ b/engines/fullpipe/scenes/sceneFinal.cpp
@@ -35,6 +35,7 @@
 
 #include "fullpipe/modal.h"
 
+#include "audio/mixer.h"
 
 namespace Fullpipe {
 
@@ -55,6 +56,7 @@ void sceneFinal_initScene() {
 	g_vars->sceneFinal_var01 = 0;
 	g_vars->sceneFinal_var02 = 0;
 	g_vars->sceneFinal_var03 = 0;
+	g_vars->sceneFinal_trackHasStarted = false;
 }
 
 int sceneFinal_updateCursor() {
@@ -72,6 +74,7 @@ void sceneHandlerFinal_endFinal() {
 
 void sceneHandlerFinal_startMusic(const char *track) {
 	g_fp->startSoundStream1(track);
+	g_vars->sceneFinal_trackHasStarted = true;
 }
 
 void sceneHandlerFinal_goto4() {
@@ -120,6 +123,12 @@ void sceneHandlerFinal_fallCoin() {
 	}
 }
 
+void checkMusic() {
+	if (g_vars->sceneFinal_trackHasStarted && !g_fp->_mixer->isSoundHandleActive(*g_fp->_soundStream1)) { // loop music
+		sceneHandlerFinal_startMusic("track16.ogg");
+	}
+}
+
 int sceneHandlerFinal(ExCommand *cmd) {
 	if (cmd->_messageKind != 17)
 		return 0;
@@ -168,6 +177,8 @@ int sceneHandlerFinal(ExCommand *cmd) {
 		break;
 	}
 
+	checkMusic();
+
 	return 0;
 }
 


Commit: a6d2feb8c462a977c39408fa28131a6daf94e7c7
    https://github.com/scummvm/scummvm/commit/a6d2feb8c462a977c39408fa28131a6daf94e7c7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-11-29T18:45:04+01:00

Commit Message:
FULLPIPE: Unstub setSceneMusicParameters()

Changed paths:
    engines/fullpipe/sound.cpp


diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index 504ea0c..d52d8dc 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -248,13 +248,10 @@ void Sound::stop() {
 }
 
 void FullpipeEngine::setSceneMusicParameters(GameVar *gvar) {
-	warning("STUB: FullpipeEngine::setSceneMusicParameters()");
 	stopSoundStream2();
 
-#if 0
-	if (soundStream3)
-		FSOUND_Stream_Stop(soundStream4);
-#endif
+	if (_mixer->isSoundHandleActive(*_soundStream3))
+		_mixer->stopHandle(*_soundStream4);
 
 	if (_musicLocal)
 		stopAllSoundStreams();
@@ -419,13 +416,10 @@ void FullpipeEngine::playSound(int id, int flag) {
 }
 
 void FullpipeEngine::playTrack(GameVar *sceneVar, const char *name, bool delayed) {
-	warning("STUB: FullpipeEngine::playTrack(var, %s, %d)", name, delayed);
-	stopSoundStream2();
+	if (_mixer->isSoundHandleActive(*_soundStream3))
+		_mixer->stopHandle(*_soundStream4);
 
-#if 0
-	if (soundStream3)
-		FSOUND_Stream_Stop(soundStream4);
-#endif
+	stopSoundStream2();
 
 	if (_musicLocal)
 		stopAllSoundStreams();


Commit: afe8a2bb3187d6f041c992f2bde1817a55c3db29
    https://github.com/scummvm/scummvm/commit/afe8a2bb3187d6f041c992f2bde1817a55c3db29
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-11-29T18:45:04+01:00

Commit Message:
FULLPIPE: Fix sound in scene04

Changed paths:
    engines/fullpipe/scenes/scene04.cpp


diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index c3557cc..05bb011 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -1076,6 +1076,8 @@ void sceneHandler04_startSounds(const char *snd1, const char *snd2, const char *
 	// playFile(snd1);
 	// playFile(snd2);
 	// playFile(snd3);
+
+	g_fp->_stream2playing = true;
 }
 
 void sceneHandler04_goClock() {





More information about the Scummvm-git-logs mailing list