[Scummvm-tracker] [ScummVM :: Bugs] #15208: SCI: KQ4: Death Music is Almost Inaudible

ScummVM :: Bugs trac at scummvm.org
Thu Aug 22 19:37:57 UTC 2024


#15208: SCI: KQ4: Death Music is Almost Inaudible
-----------------------------------+-----------------------------
Reporter:  ArthurWalden            |       Owner:  (none)
    Type:  defect                  |      Status:  new
Priority:  normal                  |   Component:  Engine: SCI
 Version:                          |  Resolution:
Keywords:  kq4, sci, death volume  |        Game:  King's Quest 4
-----------------------------------+-----------------------------
Comment (by eriktorbjorn):

 Here's a possible fix the volume. It assumes that a) volumes are in the
 0-127 range, and b) the bit about the volume table in
 https://www.smspower.org/Development/SN76489 is applicable here.

 I haven't seen any PCjr channel volume in the Sierra games I fired up be
 greater than 127. The global volume and the channel volume have the same
 default, so I've assumed they used the same range.

 {{{
 diff --git a/engines/sci/sound/drivers/pcjr.cpp
 b/engines/sci/sound/drivers/pcjr.cpp
 index c1fd4c1de56..53c2d39e8c2 100644
 --- a/engines/sci/sound/drivers/pcjr.cpp
 +++ b/engines/sci/sound/drivers/pcjr.cpp
 @@ -235,7 +235,15 @@ public:
         byte getPlayId() const override;
         int getPolyphony() const override { return 3; }
         bool hasRhythmChannel() const override { return false; }
 -       void setVolume(byte volume) override { static_cast<MidiDriver_PCJr
 *>(_driver)->_global_volume = volume; }
 +
 +       void setVolume(byte volume) override {
 +               byte volTable[16] = {
 +                       0, 5, 6, 8, 10, 12, 15, 20,
 +                       25, 31, 40, 50, 64, 80, 100, 127
 +               };
 +
 +               static_cast<MidiDriver_PCJr *>(_driver)->_global_volume =
 volTable[CLIP<byte>(volume, 0, 15)];
 +       }
  };

  byte MidiPlayer_PCJr::getPlayId() const {
 }}}
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/15208#comment:7>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list