[Scummvm-cvs-logs] SF.net SVN: scummvm: [32152] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sat May 17 17:12:21 CEST 2008


Revision: 32152
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32152&view=rev
Author:   lordhoto
Date:     2008-05-17 08:12:20 -0700 (Sat, 17 May 2008)

Log Message:
-----------
- Fixed sound channel fadeout on VQA playing
- Minor formatting fixes

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra_mr.cpp
    scummvm/trunk/engines/kyra/vqa.cpp

Modified: scummvm/trunk/engines/kyra/kyra_mr.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_mr.cpp	2008-05-17 14:47:30 UTC (rev 32151)
+++ scummvm/trunk/engines/kyra/kyra_mr.cpp	2008-05-17 15:12:20 UTC (rev 32152)
@@ -370,7 +370,10 @@
 	snprintf(filename, sizeof(filename), "%s%d.VQA", name, size);
 
 	if (vqa.open(filename)) {
-		_soundDigital->stopAllSounds();
+		for (int i = 0; i < 4; ++i) {
+			if (i != _musicSoundChannel)
+				_soundDigital->stopSound(i);
+		}
 
 		_screen->hideMouse();
 		memcpy(_screen->getPalette(1), _screen->getPalette(0), 768);

Modified: scummvm/trunk/engines/kyra/vqa.cpp
===================================================================
--- scummvm/trunk/engines/kyra/vqa.cpp	2008-05-17 14:47:30 UTC (rev 32151)
+++ scummvm/trunk/engines/kyra/vqa.cpp	2008-05-17 15:12:20 UTC (rev 32152)
@@ -362,9 +362,8 @@
 		delete[] _partialCodeBook;
 		delete[] _vectorPointers;
 
-		if (_vm->_mixer->isSoundHandleActive(_sound)) {
+		if (_vm->_mixer->isSoundHandleActive(_sound))
 			_vm->_mixer->stopHandle(_sound);
-		}
 
 		_frameInfo = NULL;
 		_frame = NULL;
@@ -655,11 +654,10 @@
 		while (1) {
 			uint32 elapsedTime;
 
-			if (_vm->_mixer->isSoundHandleActive(_sound)) {
+			if (_vm->_mixer->isSoundHandleActive(_sound))
 				elapsedTime = _vm->_mixer->getSoundElapsedTime(_sound);
-			} else {
+			else 
 				elapsedTime = _system->getMillis() - startTick;
-			}
 
 			if (elapsedTime >= (i * 1000) / _header.frameRate)
 				break;


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