summaryrefslogtreecommitdiffstats
path: root/src/test/midicontrollertest.cpp
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2014-04-14 12:57:26 -0400
committerRJ Ryan <rryan@mixxx.org>2014-04-14 12:57:26 -0400
commitd6872cdbd4de2563bb6ba9478ab0ec079d48b47d (patch)
treed164073a993727cd052130646dadc29271a48a4c /src/test/midicontrollertest.cpp
parent02bed36897b64e8441b5d7e9d28eec56cb6604a3 (diff)
Remove special-casing of 14-bit pitch behavior. Fixes Bug #1307610.
Allows mapping 14-bit pitch bend controls to COs that are not [-1.0, 1.0] ranged.
Diffstat (limited to 'src/test/midicontrollertest.cpp')
-rw-r--r--src/test/midicontrollertest.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/test/midicontrollertest.cpp b/src/test/midicontrollertest.cpp
index 0449b92293..af5e605a91 100644
--- a/src/test/midicontrollertest.cpp
+++ b/src/test/midicontrollertest.cpp
@@ -491,10 +491,8 @@ TEST_F(MidiControllerTest, ReceiveMessage_PotMeterCO_14BitCC) {
TEST_F(MidiControllerTest, ReceiveMessage_PotMeterCO_14BitPitchBend) {
ConfigKey key("[Channel1]", "rate");
- // NOTE(rryan): Currently 14-bit pitch bend only works for potmeters that
- // range from -1 to 1.
- const double kMinValue = -1.0;
- const double kMaxValue = 1.0;
+ const double kMinValue = -1234.5;
+ const double kMaxValue = 678.9;
const double kMiddleValue = (kMinValue + kMaxValue) * 0.5;
ControlPotmeter potmeter(key, kMinValue, kMaxValue);
unsigned char channel = 0x01;
@@ -521,7 +519,6 @@ TEST_F(MidiControllerTest, ReceiveMessage_PotMeterCO_14BitPitchBend) {
// parameter should map to the middle value plus a tiny amount. Scaling is
// not quite linear for MIDI parameters so just check that incrementing the
// LSB by 1 is greater than the middle value.
- potmeter.set(-0.5); // Just something that isn't the middle mark.
receive(MIDI_PITCH_BEND | channel, 0x01, 0x40);
EXPECT_LT(kMiddleValue, potmeter.get());
}