The PC Speaker streams are hardcoded at 22Khz, but when the
ScummVM queueing audio streams were created, they were being
set at the mixer rate of 44Khz. Which caused an error,
because the queueing audio stream expected the added streams
to be at the same rate. For now, the best solution seemed to
be to ignore the passed rate, and hardcode the queueing
audio streams to a rate of 22Khz to match.
The initial list comes from the Pentagram codebase, will need some disassembly
of regret.exe to get much further.
Also removed the (now unused) code that did usecode disassembly things for
Pentagram.
ZMachine saves also includes the current execution
stack. So I'm honestly not sure how to create an
autosave in the background that has a valid stack
than can be properly restored. With an imminent
release, it's better to disable autosaves for now
Previously frequency of zero samples crashed the debug version,
now they are simply discarded. Also the frequency calculation is done
differently in the Amiga version of Operation Stealth than in the
Future Wars. This fixes playing samples in Amiga versions of Operation
Stealth (Not crashing on frequency of zero samples and playing the
samples at their right pitch).
The .AMI files load better with loadSpl function than loadAni.
Using loadAni for some of the files resulted in garbled sound when
the input data was presumed to be 4-bit although it was 8-bit.
Fixes loading of some Amiga samples in Operation Stealth
(Not all samples were affected). Addresses bug #11676.
Addresses most of the issues in bug #11293
Does not address the "Hanoi is not facing McCoy when speaking to him" bullet, which only occurs on specific banter talk
We need to find the actual interpreter difference that causes this bug,
and not patch scenes in this manner, as this bug does not occur with
the original. There is still no explanation why this bug occurs in
ScummVM, so it's best to revert the inserted script code, as it caused
a regression in bug #11671.
This reverts commit 6216f855a801eba65727392a67f29224f38ea2e9.
In Operation Stealth DOS and Atari ST versions, but not Amiga or
demo versions, sound effects are loaded in AUTO00.PRC using a
combination of o2_loadAbs and o2_playSample(1, ...) before
o1_freePartRange(0, 200). This is a better heuristic for ending the
script at the correct position than checking whether global variable
255 is compared to 0. In the original game AUTO00.PRC was run when
starting or restarting the game and one could not load a savegame
before passing the copy protection. Thus, we try to emulate that
behaviour by running at least part of AUTO00.PRC before loading a
savegame.