1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a warning and a wrong indentation in MidiMessage.

This commit is contained in:
Timur Doumler 2016-05-26 10:03:06 +01:00
parent 0141d0e1a6
commit 8c99b63a5d

View file

@ -47,8 +47,9 @@ uint16 MidiMessage::pitchbendToPitchwheelPos (const float pitchbend,
// can't translate a pitchbend value that is outside of the given range! // can't translate a pitchbend value that is outside of the given range!
jassert (std::abs (pitchbend) <= pitchbendRange); jassert (std::abs (pitchbend) <= pitchbendRange);
return pitchbend > 0.0f ? jmap (pitchbend, 0.0f, pitchbendRange, 8192.0f, 16383.0f) return static_cast<uint16> (pitchbend > 0.0f
: jmap (pitchbend, -pitchbendRange, 0.0f, 0.0f, 8192.0f); ? jmap (pitchbend, 0.0f, pitchbendRange, 8192.0f, 16383.0f)
: jmap (pitchbend, -pitchbendRange, 0.0f, 0.0f, 8192.0f));
} }
//============================================================================== //==============================================================================