[Scummvm-cvs-logs] SF.net SVN: scummvm:[46477] scummvm/trunk/engines/sci/sfx

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Tue Dec 22 01:35:27 CET 2009


Revision: 46477
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46477&view=rev
Author:   thebluegr
Date:     2009-12-22 00:35:27 +0000 (Tue, 22 Dec 2009)

Log Message:
-----------
Fixed looping sounds in the new sound code

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sfx/music.cpp
    scummvm/trunk/engines/sci/sfx/soundcmd.cpp

Modified: scummvm/trunk/engines/sci/sfx/music.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/music.cpp	2009-12-22 00:16:09 UTC (rev 46476)
+++ scummvm/trunk/engines/sci/sfx/music.cpp	2009-12-22 00:35:27 UTC (rev 46477)
@@ -611,8 +611,8 @@
 			info.ext.data = _position._play_pos;
 			_position._play_pos += info.length;
 			if (info.ext.type == 0x2F) {// end of track reached
-				int loop = GET_SEL32V(_segMan, _pSnd->soundObj, loop);
-				if (loop) {
+				int16 loop = GET_SEL32V(_segMan, _pSnd->soundObj, loop);
+				if (loop == 0xFFFF) {
 					jumpToTick(_loopTick);
 					PUT_SEL32V(_segMan, _pSnd->soundObj, loop, loop--);
 				} else {

Modified: scummvm/trunk/engines/sci/sfx/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.cpp	2009-12-22 00:16:09 UTC (rev 46476)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.cpp	2009-12-22 00:35:27 UTC (rev 46477)
@@ -779,7 +779,7 @@
 
 void SoundCommandParser::cmdSetHandleLoop(reg_t obj, int16 value) {
 	if (!GET_SEL32(_segMan, obj, nodePtr).isNull()) {
-		PUT_SEL32V(_segMan, obj, loop, value);
+		PUT_SEL32V(_segMan, obj, loop, value == 0xFFFF ? 0xFFFF : 1);
 #ifdef USE_OLD_MUSIC_FUNCTIONS
 	SongHandle handle = FROBNICATE_HANDLE(obj);
 	_state->sfx_song_set_loops(handle, value);


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