diff options
author | Sven Hesse | 2016-02-28 21:04:23 +0100 |
---|---|---|
committer | Sven Hesse | 2016-02-28 21:04:23 +0100 |
commit | 2c8160245460cc9a7a864b58b4e962f7a2c77c4b (patch) | |
tree | 005405df95a43157bc35faa3c22cd9055a068c2a /engines/gob | |
parent | 962e32e0ec0cf12ac8921e14ed38f9a28c31cfb0 (diff) | |
download | scummvm-rg350-2c8160245460cc9a7a864b58b4e962f7a2c77c4b.tar.gz scummvm-rg350-2c8160245460cc9a7a864b58b4e962f7a2c77c4b.tar.bz2 scummvm-rg350-2c8160245460cc9a7a864b58b4e962f7a2c77c4b.zip |
GOB: Don't completely reset the OPL in AdLib::initOPL()
It shouldn't be necessary anymore, since initOPL() cleans everything.
If, however, suddenly a piece of music sounds weird in a Gob game,
this is the place to look for.
This fixes a race condition between OPL::reset() and the callback
timer.
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/sound/adlib.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index 1e024d5a50..2a9a716058 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -283,7 +283,12 @@ void AdLib::initOPL() { _voiceOn [i] = 0; } - _opl->reset(); + /* NOTE: We used to completely reset the OPL here, via _opl->reset(). However, + * with the OPL timer change in 73e8ac2a, reset() must not be called while + * the callback is still active. With the Gob AdLib rewrite in 03ef6689, + * this reset shouldn't be necessary anymore either, since this function + * here cleans everything properly anyway. If suddenly a certain piece of + * music in a Gob game sounds weird, we need to re-examine that. */ initOperatorVolumes(); resetFreqs(); |