diff options
author | Max Horn | 2003-10-06 01:25:24 +0000 |
---|---|---|
committer | Max Horn | 2003-10-06 01:25:24 +0000 |
commit | a4150583cccd85c5275237acc5141571ad2e7666 (patch) | |
tree | f9008d0d7dbecf8573edb12bee044c563cedeea1 /backends/midi/ym2612.cpp | |
parent | ef485006b159e580ee9cb9e8bb7744012a7d6117 (diff) | |
download | scummvm-rg350-a4150583cccd85c5275237acc5141571ad2e7666.tar.gz scummvm-rg350-a4150583cccd85c5275237acc5141571ad2e7666.tar.bz2 scummvm-rg350-a4150583cccd85c5275237acc5141571ad2e7666.zip |
oops - that happesn if you incorrectly re-apply a broken patch =)
svn-id: r10628
Diffstat (limited to 'backends/midi/ym2612.cpp')
-rw-r--r-- | backends/midi/ym2612.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/backends/midi/ym2612.cpp b/backends/midi/ym2612.cpp index 1a128df8d1..0bb8e6ee33 100644 --- a/backends/midi/ym2612.cpp +++ b/backends/midi/ym2612.cpp @@ -280,25 +280,25 @@ void Operator2612::frequency(int freq) { } _attackTime = (int32) value; // 1 秒 == (1 << 12) - r = _specifiedDecayRate / _owner->_rate; + r = _specifiedDecayRate; if (r != 0) { r = r * 2 + (keyscaleTable[freq/262205] >> (3-_keyScale)); if (r >= 64) r = 63; } value = (double) powtbl[(r&3) << 7] * (0x10 << (r>>2)) / 31; - _decayRate = (int32) value; + _decayRate = (int32) value / _owner->_rate; - r = _specifiedSustainRate / _owner->_rate; + r = _specifiedSustainRate; if (r != 0) { r = r * 2 + (keyscaleTable[freq/262205] >> (3-_keyScale)); if (r >= 64) r = 63; } value = (double) powtbl[(r&3) << 7] * (0x10 << (r>>2)) / 31; - _sustainRate = (int32) value; + _sustainRate = (int32) value / _owner->_rate; - r = _specifiedReleaseRate / _owner->_rate; + r = _specifiedReleaseRate; if (r != 0) { r = r * 2 + 1; // このタイミングで良いのかわからん r = r * 2 + (keyscaleTable[freq/262205] >> (3-_keyScale)); @@ -307,7 +307,7 @@ void Operator2612::frequency(int freq) { r = 63; } value = (double) powtbl[(r&3) << 7] * (0x10 << (r>>2)) / 31; - _releaseRate = (int32) value; + _releaseRate = (int32) value / _owner->_rate; } int Operator2612::nextTick(uint16 rate, int phaseShift) { |