[Scummvm-tracker] [ScummVM :: Bugs] #13048: AGOS: Waxworks soundblaster sound doesn't work

ScummVM :: Bugs trac at scummvm.org
Fri Oct 29 12:09:28 UTC 2021


#13048: AGOS: Waxworks soundblaster sound doesn't work
-------------------------------------+---------------------------
Reporter:  Max833                    |       Owner:  (none)
    Type:  defect                    |      Status:  new
Priority:  high                      |   Component:  Engine: AGOS
 Version:                            |  Resolution:
Keywords:  sound, bug, soundblaster  |        Game:  Waxworks
-------------------------------------+---------------------------
Comment (by eriktorbjorn):

 I think the problem is in how it calculates adjustedVelocity for
 noteOnSetVolume(). This value eventually becomes what's passed to the
 40-55 registers ("Level Key Scaling / Total Level"). See
 http://www.shipbrook.net/jeff/sb.html for reference.

 `regValue40h = (63 - adjustedVelocity) & 0x3F;`

 So if adjustedVelocity is greater than 63, regValue40h will wrap around
 from a small value to a potentially very large one. The larger the value,
 the lower the volume. If I cap adjustedVelocity at 63, I ''think'' I hear
 all the notes. That's probably not the right way of doing it, but it
 provides a clue.

 This value is calculated in noteOn(), and this is where things get weird.
 For one thing, it calculates a value for channelVolumeAdjust but I can't
 see that it's ever used. So it takes the unadjusted velocity in, and then
 increases it even further by adjusting it with the master volume. I have
 no idea what this is supposed to look like.
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/13048#comment:2>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list