mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 13:50:13 +00:00
Fixed transpose/detune computations
svn-id: r9715
This commit is contained in:
parent
2750eabcd5
commit
4da3bf3a61
@ -1419,11 +1419,11 @@ void Part::set_pan(int8 pan) {
|
||||
}
|
||||
|
||||
void Part::set_transpose(int8 transpose) {
|
||||
_transpose_eff = transpose_clamp((_transpose = transpose) + _player->getTranspose(), -12, 12);
|
||||
_transpose_eff = transpose_clamp((_transpose = transpose) + _player->getTranspose(), -24, 24);
|
||||
if (_mc) {
|
||||
_mc->pitchBend(clamp(_pitchbend +
|
||||
(_detune_eff * 64 / 12) +
|
||||
(_transpose_eff * 8192 / 12), -8192, 8191));
|
||||
(_detune_eff * /*64*/82 / _pitchbend_factor) +
|
||||
(_transpose_eff * 8192 / _pitchbend_factor), -8192, 8191));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -652,7 +652,7 @@ int Player::setTranspose(byte relative, int b) {
|
||||
if (b > 24 || b < -24 || relative > 1)
|
||||
return -1;
|
||||
if (relative)
|
||||
b = transpose_clamp(_transpose + b, -7, 7);
|
||||
b = transpose_clamp(_transpose + b, -24, 24);
|
||||
|
||||
_transpose = b;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user