[Scummvm-tracker] [ScummVM :: Bugs] #14558: SCI: Use the SCI32 SOL decoder for SCI 0-1.1 games

ScummVM :: Bugs trac at scummvm.org
Tue Aug 1 15:06:58 UTC 2023


#14558: SCI: Use the SCI32 SOL decoder for SCI 0-1.1 games
------------------------+--------------------------
Reporter:  ccawley2011  |       Owner:  (none)
    Type:  defect       |      Status:  new
Priority:  normal       |   Component:  Engine: SCI
 Version:               |  Resolution:
Keywords:  performance  |        Game:
------------------------+--------------------------
Comment (by sluicebox):

 More notes:
 - The two decoders don't use the same flag logic, even on flags they both
 handle. SCI16 can set FLAG_UNSIGNED on 16-bit audio, SCI32 doesn't.
 - The SCI32 decoder expects SOL data to be 32 bit aligned. I don't see
 that in the SCI16 decoder. I looked at an SCI16 AUDBLAST.DRV (LSL6 floppy)
 and saw some code that looks like it does this.
 - I tried using the SCI32 decoder on Brain2 1.1 and the sounds were
 noticeably different: volume, background noise (maybe that was just
 volume), and an occasional glitch. So they're doing different things. This
 was not due to the 32 bit alignment code; same results with and without.

 I wrote a thing to scan my RESOURCE.AUD/SFX and RESAUD.0## files for the
 SOL header and parse out the header sizes (versions) and flag bytes and
 make a report to see who was using what. Some things I noticed:

 - QFG3 Demo appears to be the only game that uses header size 7
 - Some games use multiple header sizes (11 and 12) within the same version
 - The 16-bit flag and the signed flag are always both set or both clear.
 That explains why the SCI32 decoder can get away with ignoring the signed
 flag. Unclear if that was intentional. No comments!
 - LSL7 is the only game I see with the Stereo flag
 - There is an unknown flag 0x80 that appears in eco1-cd. Unclear if
 anything uses it; the AUDBLAST.DRV I looked at appears to set a variable
 when it's present but then doesn't use that.

 Once we can explain the playback discrepancy, we can switch to the SCI32
 stream-based decoder and remove the ancient one from the aughts. I've
 tried this and it cleans up `AudioPlayer::getAudioStream`, a frequent
 source of bugs, so I'm excited about that.

 I'm stepping away from this particular rabbit hole though, at least for a
 while. I've got others!
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/14558#comment:2>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list