diff options
author | Filippos Karapetis | 2012-11-15 14:09:52 +0200 |
---|---|---|
committer | Filippos Karapetis | 2012-11-15 14:30:41 +0200 |
commit | 3233edf9b843f16018b6142b344b08dedae74d67 (patch) | |
tree | 147da92c466ad5646373521ed8088ce9b399356e /audio/softsynth/mt32/LA32Ramp.cpp | |
parent | 97854df1a8d5b322fab12bad11ad4c859a28062b (diff) | |
download | scummvm-rg350-3233edf9b843f16018b6142b344b08dedae74d67.tar.gz scummvm-rg350-3233edf9b843f16018b6142b344b08dedae74d67.tar.bz2 scummvm-rg350-3233edf9b843f16018b6142b344b08dedae74d67.zip |
MT32: Update the MT32 emulator to the latest munt revision
Previous munt revision was 189f607c88e7404ad99abcf4b90f23b103003ed1
(Feb 09, 2012).
Current munt revision is f969d2081d41b669c1bfebd0026b5419c09517ae
(Nov 15, 2012)
Diffstat (limited to 'audio/softsynth/mt32/LA32Ramp.cpp')
-rw-r--r-- | audio/softsynth/mt32/LA32Ramp.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/softsynth/mt32/LA32Ramp.cpp b/audio/softsynth/mt32/LA32Ramp.cpp index 9f1f01c3c2..4e4d6b4f30 100644 --- a/audio/softsynth/mt32/LA32Ramp.cpp +++ b/audio/softsynth/mt32/LA32Ramp.cpp @@ -79,11 +79,12 @@ LA32Ramp::LA32Ramp() : void LA32Ramp::startRamp(Bit8u target, Bit8u increment) { // CONFIRMED: From sample analysis, this appears to be very accurate. - // FIXME: We could use a table for this in future if (increment == 0) { largeIncrement = 0; } else { - largeIncrement = (unsigned int)(EXP2F(((increment & 0x7F) + 24) / 8.0f) + 0.125f); + // Using integer argument here, no precision loss: + // (unsigned int)(EXP2F(((increment & 0x7F) + 24) / 8.0f) + 0.125f) + largeIncrement = (unsigned int)(EXP2I(((increment & 0x7F) + 24) << 9) + 0.125f); } descending = (increment & 0x80) != 0; if (descending) { |