SCUMM: Add adjustment sliders for VGA Loom (CD) and MI1 (CD)

When ripping the audio tracks from CD, you may not get quite what the
game expects, e.g. my copy of Loom has less silence at the start of the
track than the CDDA.SOU file from the Steam version. And the MI1 intro
appears to be timed with the assumption that there is no silence at all
at the start of that track.

This makes it possible to compensate for that without having to edit the
audio file. It may also be of some help with fan soundtrack replacements
for MI1, though I have little experience with that.
This commit is contained in:
Torbjörn Andersson 2022-05-28 14:14:22 +02:00 committed by Eugene Sandulenko
parent 3ef9fb93fd
commit 6a040e3ea2
5 changed files with 344 additions and 24 deletions

View file

@ -3073,11 +3073,19 @@ void ScummEngine_v5::decodeParseString() {
// I.e. in total 22650 frames.
offset = (int)(offset * 7.5 - 22500 - 2*75);
// Add the user-specified adjustment.
if (ConfMan.hasKey("loom_playback_adjustment")) {
int adjustment = ConfMan.getInt("loom_playback_adjustment");
offset += ((75 * adjustment) / 100);
if (offset < 0)
offset = 0;
}
// Slightly increase the delay (5 frames = 1/25 of a second).
// This noticably improves the experience in Loom CD.
delay = (int)(delay * 7.5 + 5);
_sound->playCDTrack(1, 0, offset, delay);
_sound->playCDTrack(1, 1, offset, delay);
}
} else {
error("ScummEngine_v5::decodeParseString: Unhandled case 8");