diff options
author | Matthew Hoops | 2010-06-10 20:26:59 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-06-10 20:26:59 +0000 |
commit | 9f907aac095123ac016a23a559f54ada35af6772 (patch) | |
tree | 932c0f972e1a0c31bd943ebbf61888a1e1ac82cf /engines/sci/engine | |
parent | 8f55c4ddb4ceb64e6121ee9fe08b07c2905d4748 (diff) | |
download | scummvm-rg350-9f907aac095123ac016a23a559f54ada35af6772.tar.gz scummvm-rg350-9f907aac095123ac016a23a559f54ada35af6772.tar.bz2 scummvm-rg350-9f907aac095123ac016a23a559f54ada35af6772.zip |
kSciAudioWPlay should not actually play the song, but 'pre-load' it. We fake the pre-loading with a flag that will return 0 if the song has been called with kSciAudioWPlay. Fixes the dream sequence sound in MUMG.
svn-id: r49583
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/ksound.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index 29302181b1..ebfd6e6885 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -44,7 +44,6 @@ reg_t kDoSound(EngineState *s, int argc, reg_t *argv) { reg_t kDoCdAudio(EngineState *s, int argc, reg_t *argv) { switch (argv[0].toUint16()) { - case kSciAudioWPlay: case kSciAudioPlay: { if (argc < 2) return NULL_REG; @@ -72,6 +71,7 @@ reg_t kDoCdAudio(EngineState *s, int argc, reg_t *argv) { break; case kSciAudioPosition: return make_reg(0, g_sci->_audio->audioCdPosition()); + case kSciAudioWPlay: // CD Audio can't be preloaded case kSciAudioRate: // No need to set the audio rate case kSciAudioVolume: // The speech setting isn't used by CD Audio case kSciAudioLanguage: // No need to set the language @@ -119,7 +119,11 @@ reg_t kDoAudio(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } - return make_reg(0, g_sci->_audio->startAudio(module, number)); // return sample length in ticks + // return sample length in ticks + if (argv[0].toUint16() == kSciAudioWPlay) + return make_reg(0, g_sci->_audio->wPlayAudio(module, number)); + else + return make_reg(0, g_sci->_audio->startAudio(module, number)); } case kSciAudioStop: g_sci->_audio->stopAudio(); |