diff options
author | Torbjörn Andersson | 2006-03-14 23:01:44 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-03-14 23:01:44 +0000 |
commit | 839b5d3e8665171a97cb6ca51289838de65a19a4 (patch) | |
tree | a5d79a1e29bd0f30164d633f64efe8ede483d56b /engines/kyra | |
parent | 59b6f0f715fb9874858feb40a22b844e42a3ce79 (diff) | |
download | scummvm-rg350-839b5d3e8665171a97cb6ca51289838de65a19a4.tar.gz scummvm-rg350-839b5d3e8665171a97cb6ca51289838de65a19a4.tar.bz2 scummvm-rg350-839b5d3e8665171a97cb6ca51289838de65a19a4.zip |
Added workaround in FMOPL for the pathological case where a note was turned off
while still at the very beginning of the "attack" phase. This is the very
lowest point on the attack curve, yet it would continue from the beginning of
the release curve, i.e. its very highest point. This is what caused Kyra to
often play low-frequency notes at the very beginning of a new song. (That, and
a truly bizarre function for initialising the channels.)
The proper fix would be to locate the correct point on the release curve and
continue from there. For now, though, only handle the trivial case.
svn-id: r21302
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/sound_adlib.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index 5ab65df5c6..586326e9d0 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -808,18 +808,17 @@ void AdlibDriver::unkOutput2(uint8 chan) { // including the two most significant frequency bit, and the octave - // set to zero. // - // This is very strange behaviour, and appears to be the cause of the - // bug where low-frequent notes are played at the beginning of a new - // sound. However, this is what the original does, and the bug does not - // seem to happen with current versions of the FMOPL code. + // This is very strange behaviour, and causes problems with the ancient + // FMOPL code we borrowed from AdPlug. I've added a workaround. See + // fmopl.cpp for more details. // - // Unfortunately, we cannot use more recent versions because of license - // incompatibilities. + // More recent versions of the MAME FMOPL don't seem to have this + // problem, but cannot currently be used because of licensing and + // performance issues. // // Ken Silverman's Adlib emulator (which can be found on his Web page - // http://www.advsys.net/ken - and as part of AdPlug) also seems to be - // proof against this particular bug, but is apparently not as feature - // complete as MAME's. + // immune, but is apparently not as feature complete as MAME's. writeOPL(0xB0 + chan, 0x20); } |