Created
February 24, 2019 16:59
-
-
Save jpcima/482732dde7246b0f64f239e8382c530e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/chips/opal/opal.hpp b/src/chips/opal/opal.hpp | |
index f554920..590f38d 100644 | |
--- a/src/chips/opal/opal.hpp | |
+++ b/src/chips/opal/opal.hpp | |
@@ -1237,12 +1237,8 @@ void Opal::Operator::SetFrequencyMultiplier(uint16_t scale) { | |
//================================================================================================== | |
void Opal::Operator::SetKeyScale(uint16_t scale) { | |
- if (scale > 0) | |
- KeyScaleShift = 3 - scale; | |
- | |
- // No scaling, ensure it has no effect | |
- else | |
- KeyScaleShift = 15; | |
+ const unsigned KslShiftTable[4] = {31, 1, 2, 0}; | |
+ KeyScaleShift = KslShiftTable[scale]; | |
ComputeKeyScaleLevel(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment