aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/ksound.cpp2
-rw-r--r--engines/sci/sfx/audio.cpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 0c30c6e511..651a02d8ba 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -1029,7 +1029,7 @@ reg_t kDoCdAudio(EngineState *s, int argc, reg_t *argv) {
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;
diff --git a/engines/sci/sfx/audio.cpp b/engines/sci/sfx/audio.cpp
index 3040e6b6c9..ed7425ff26 100644
--- a/engines/sci/sfx/audio.cpp
+++ b/engines/sci/sfx/audio.cpp
@@ -285,7 +285,10 @@ int AudioPlayer::audioCdPlay(int track, int start, int duration) {
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 @@ int AudioPlayer::audioCdPlay(int track, int start, int duration) {
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();