1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-02 20:30:00 +00:00

Corrects output range.

This commit is contained in:
Thomas Harte 2020-04-25 00:07:58 -04:00
parent 6ebc93c995
commit 12c618642e

View File

@ -196,7 +196,7 @@ void OPLL::update_all_chanels() {
// in rhythm mode the final three channels — 6, 7, and 8 —
// are lost as their operators are used for drum noises.
for(int c = 0; c < 6; ++ c) {
channels_[c].level = (channels_[c].update(oscillator_) * total_volume_) >> 11;
channels_[c].level = (channels_[c].update(oscillator_) * total_volume_) >> 12;
}
if(depth_rhythm_control_ & 0x20) {
@ -204,7 +204,7 @@ void OPLL::update_all_chanels() {
} else {
// Not in rhythm mode; channels 7, 8 and 9 are melodic.
for(int c = 7; c < 9; ++ c) {
channels_[c].level = (channels_[c].update(oscillator_) * total_volume_) >> 11;
channels_[c].level = (channels_[c].update(oscillator_) * total_volume_) >> 12;
}
}