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

mthreepwood at users.sourceforge.net mthreepwood at users.sourceforge.net
Wed Nov 4 16:41:41 CET 2009


Revision: 45669
          http://scummvm.svn.sourceforge.net/scummvm/?rev=45669&view=rev
Author:   mthreepwood
Date:     2009-11-04 15:41:40 +0000 (Wed, 04 Nov 2009)

Log Message:
-----------
Fix CD Audio in JonesCD and add some comments.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/sfx/audio.cpp

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2009-11-04 15:32:25 UTC (rev 45668)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2009-11-04 15:41:40 UTC (rev 45669)
@@ -1029,7 +1029,7 @@
 		if (argc < 2)
 			return NULL_REG;
 
-		uint16 track = argv[1].toUint16() - 1;
+		uint16 track = argv[1].toUint16();
 		uint32 startFrame = (argc > 2) ? argv[2].toUint16() * 75 : 0;
 		uint32 totalFrames = (argc > 3) ? argv[3].toUint16() * 75 : 0;
 

Modified: scummvm/trunk/engines/sci/sfx/audio.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/audio.cpp	2009-11-04 15:32:25 UTC (rev 45668)
+++ scummvm/trunk/engines/sci/sfx/audio.cpp	2009-11-04 15:41:40 UTC (rev 45669)
@@ -285,7 +285,10 @@
 	if (getSciVersion() == SCI_VERSION_1_1) {
 		// King's Quest VI CD Audio format
 		_audioCdStart = g_system->getMillis();
-		AudioCD.play(track, 1, start, duration);
+		
+		// Subtract one from track. KQ6 starts at track 1, while ScummVM
+		// ignores the data track and considers track 2 to be track 1.
+		AudioCD.play(track - 1, 1, start, duration);
 		return 1;
 	} else {
 		// Jones in the Fast Lane CD Audio format
@@ -305,7 +308,8 @@
 			length = audioMap.readUint16LE();
 			length += audioMap.readByte() << 16;
 			audioMap.readByte(); // Unknown, always 0x00
-		
+
+			// Jones uses the track as the resource value in the map
 			if (res == track) {
 				AudioCD.play(1, 1, startFrame, length);
 				_audioCdStart = g_system->getMillis();


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