aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorFilippos Karapetis2010-06-17 12:29:58 +0000
committerFilippos Karapetis2010-06-17 12:29:58 +0000
commit0e365131ac58b7504e9e16b08a8b3125b6b37027 (patch)
tree00ce7518d4e381726ceab9c4575d6a14095e2657 /engines/sci
parentcf86b447939a3baea5aa3bd53450f8f56f436740 (diff)
downloadscummvm-rg350-0e365131ac58b7504e9e16b08a8b3125b6b37027.tar.gz
scummvm-rg350-0e365131ac58b7504e9e16b08a8b3125b6b37027.tar.bz2
scummvm-rg350-0e365131ac58b7504e9e16b08a8b3125b6b37027.zip
Fixed wPlayAudio, and added some documentation on the 3 new kDoAudio subops. Digital sounds in Pharkas work again
svn-id: r49928
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/ksound.cpp16
-rw-r--r--engines/sci/sound/audio.cpp2
2 files changed, 14 insertions, 4 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 8cf9400353..d4af4ade5c 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -174,9 +174,19 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) {
case kSciAudioCD:
debugC(2, kDebugLevelSound, "kDoAudio: CD audio subop");
return kDoCdAudio(s, argc - 1, argv + 1);
- // TODO: There are 3 more functions used in Freddy Pharkas (11, 12 and 13) and new within sierra sci
- // Details currently unknown
- // kDoAudio sits at seg026:038C
+
+ // 3 new subops in Pharkas. kDoAudio in Pharkas sits at seg026:038C
+ case 11:
+ warning("kDoAudio: Unhandled case %d, %d extra arguments passed", argv[0].toUint16(), argc - 1);
+ break;
+ case 12:
+ // Seems to be audio sync, used in Pharkas, silenced warning cause of the spam it produces
+ //warning("kDoAudio: Unhandled case %d, %d extra arguments passed", argv[0].toUint16(), argc - 1);
+ break;
+ case 13:
+ // Used in Pharkas whenever a speech sample starts
+ warning("kDoAudio: Unhandled case %d, %d extra arguments passed", argv[0].toUint16(), argc - 1);
+ break;
default:
warning("kDoAudio: Unhandled case %d, %d extra arguments passed", argv[0].toUint16(), argc - 1);
}
diff --git a/engines/sci/sound/audio.cpp b/engines/sci/sound/audio.cpp
index ac3ef54c9a..0e235ee400 100644
--- a/engines/sci/sound/audio.cpp
+++ b/engines/sci/sound/audio.cpp
@@ -82,7 +82,7 @@ int AudioPlayer::wPlayAudio(uint16 module, uint32 tuple) {
// sample length and return that. wPlayAudio should *not* actually start the sample.
int sampleLen = 0;
- Audio::AudioStream *audioStream = getAudioStream(module, tuple, &sampleLen);
+ Audio::AudioStream *audioStream = getAudioStream(tuple, module, &sampleLen);
if (!audioStream)
warning("wPlayAudio: unable to create stream for audio tuple %d, module %d", tuple, module);
delete audioStream;