Fixes several problems with the SoundResource class:
- Constructor doesn't fully initialize object if resource doesn't exist
- Destructor crashes if object not fully initialized
- Constructor has no mechanism to report failure
- Callers believe failure is reported by constructor returning null
- SoundCommandParser::initSoundResource attempts to pre-detect failure
insufficiently in the absence of a formal mechanism.
SoundResource now always fully initializes, the destructor no longer
accesses uninitialized memory, and an exists() method has been added
which callers now test.
SQ6 Mac can now progress past the main menu.
Loading is not normally allowed while audio is being played in SCI games.
Stopping sounds is needed in ScummVM, as the player may load via
Control-F5 at any point, even while a sound is playing.
The current patch mechanism allows only replacing intructions in current
scripts, but not adding new instructions out of nowhere.
Thus, issue like #9646 is about to be closed as WONTFIX.
This new mechanism adds a hook on vm.cpp, before executing opcodes, and
if required, executs a new code.
It solves one of the issues of #9646, the others can be solved as well using that mechanism.
There are many situations that GM sounds worse than MT, even for games
that were written for GM.
I think this is related to this.
And, there is a note in midi.cpp:
// NOTE: SSCI uses channels 1 through 8 for General MIDI as well, in the drivers I checked
Also, issue #6686 reports that using the "higher" channels causes
problem on a real SC-55.
This change solves at least: #6686, #9735 and #10297
This adds support for the Roland GS drumkits used by SQ5 and QfG3.
The original Sierra GM driver does not pass the drumkit select MIDI
messages to the GM device, but they do exist in the MIDI data.
Another issue is that the drumkit numbers used are incorrect. This
does work on the original Roland SC-55 devices because they correct
the drumkit numbers. Later devices do not do this. Code has been
added to correct these wrong drumkit numbers.