diff options
author | Simon Howard | 2014-10-14 22:59:42 -0400 |
---|---|---|
committer | Simon Howard | 2014-10-14 22:59:42 -0400 |
commit | c7e82b3866134277e73f9a9d2b0f67da3fa403d0 (patch) | |
tree | 512f4f70bdc3516abc5ed0f4d7c1402353c25a24 /src/sha1.h | |
parent | 77d7e984d19f52215bf22df95358ef41dda1e430 (diff) | |
download | chocolate-doom-c7e82b3866134277e73f9a9d2b0f67da3fa403d0.tar.gz chocolate-doom-c7e82b3866134277e73f9a9d2b0f67da3fa403d0.tar.bz2 chocolate-doom-c7e82b3866134277e73f9a9d2b0f67da3fa403d0.zip |
Fix OPL MIDI tempo calculations.
It turns out that the way that tempo has been calculated in OPL playback
has been broken for a long time. The mysterious "fudge factor" that I
had to apply to tempo calculations is actually completely unnecessary:
the byte-swapping in the MIDI_GetFileTimeDivision() function was being
done wrong, so the time division being used by the OPL MIDI code was
completely wrong. Presumably the multiply by 260 was close enough to an
8-bit bitshift that it worked okayish, but large enough time division
values would overflow a single byte and screw up.
This fixes long-running OPL playback problems in a number of WADs, most
notably Alien Vendetta. This *really* fixes #352.
Diffstat (limited to 'src/sha1.h')
0 files changed, 0 insertions, 0 deletions