diff options
author | Colin Snover | 2017-09-24 01:47:37 -0500 |
---|---|---|
committer | Colin Snover | 2017-09-24 22:56:57 -0500 |
commit | 21337e4cf63fa1c4248bbb2b6173f121a126fed8 (patch) | |
tree | b4ec5f887226e0df01cb80d767002478c66115d3 /engines/sci/engine | |
parent | d9dfca2fcbe89d3d5e783599466a1a5db6f3dc87 (diff) | |
download | scummvm-rg350-21337e4cf63fa1c4248bbb2b6173f121a126fed8.tar.gz scummvm-rg350-21337e4cf63fa1c4248bbb2b6173f121a126fed8.tar.bz2 scummvm-rg350-21337e4cf63fa1c4248bbb2b6173f121a126fed8.zip |
SCI32: Implement per-channel audio panning
Used by RAMA, in various places, starting with the refrigerator
at base camp after the cable car at the beginning of the game.
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 4 | ||||
-rw-r--r-- | engines/sci/engine/ksound.cpp | 10 |
3 files changed, 14 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h index a712474983..7e576f5b98 100644 --- a/engines/sci/engine/kernel.h +++ b/engines/sci/engine/kernel.h @@ -440,6 +440,8 @@ reg_t kDoAudioPreload(EngineState *s, int argc, reg_t *argv); reg_t kDoAudioFade(EngineState *s, int argc, reg_t *argv); reg_t kDoAudioHasSignal(EngineState *s, int argc, reg_t *argv); reg_t kDoAudioSetLoop(EngineState *s, int argc, reg_t *argv); +reg_t kDoAudioPan(EngineState *s, int argc, reg_t *argv); +reg_t kDoAudioPanOff(EngineState *s, int argc, reg_t *argv); reg_t kRobot(EngineState *s, int argc, reg_t *argv); reg_t kRobotOpen(EngineState *s, int argc, reg_t *argv); diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 884a499542..6a45241817 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -236,8 +236,8 @@ static const SciKernelMapSubEntry kDoAudio_subops[] = { { SIG_SINCE_SCI21MID, 17, MAP_CALL(DoAudioHasSignal), "", NULL }, { SIG_SINCE_SCI21MID, 18, MAP_EMPTY(DoAudioCritical), "(i)", NULL }, { SIG_SINCE_SCI21MID, 19, MAP_CALL(DoAudioSetLoop), "iii(o)", NULL }, - { SIG_SCI3, 20, MAP_DUMMY(DoAudioPan), "", NULL }, - { SIG_SCI3, 21, MAP_DUMMY(DoAudioPanOff), "", NULL }, + { SIG_SCI3, 20, MAP_CALL(DoAudioPan), "ii(i)(iii)", NULL }, + { SIG_SCI3, 21, MAP_CALL(DoAudioPanOff), "i(i)(iii)", NULL }, SCI_SUBOPENTRY_TERMINATOR }; #endif diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index ad137566a2..ee4f8efd9a 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -466,6 +466,16 @@ reg_t kDoAudioSetLoop(EngineState *s, int argc, reg_t *argv) { return s->r_acc; } +reg_t kDoAudioPan(EngineState *s, int argc, reg_t *argv) { + g_sci->_audio32->kernelPan(argc, argv); + return s->r_acc; +} + +reg_t kDoAudioPanOff(EngineState *s, int argc, reg_t *argv) { + g_sci->_audio32->kernelPanOff(argc, argv); + return s->r_acc; +} + reg_t kSetLanguage(EngineState *s, int argc, reg_t *argv) { // This is used by script 90 of MUMG Deluxe from the main menu to toggle // the audio language between English and Spanish. |