Browse Source

Fixed a warning and a wrong indentation in MidiMessage.

tags/2021-05-28
Timur Doumler 9 years ago
parent
commit
8c99b63a5d
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      modules/juce_audio_basics/midi/juce_MidiMessage.cpp

+ 3
- 2
modules/juce_audio_basics/midi/juce_MidiMessage.cpp 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!
jassert (std::abs (pitchbend) <= pitchbendRange);
return pitchbend > 0.0f ? jmap (pitchbend, 0.0f, pitchbendRange, 8192.0f, 16383.0f)
: jmap (pitchbend, -pitchbendRange, 0.0f, 0.0f, 8192.0f);
return static_cast<uint16> (pitchbend > 0.0f
? jmap (pitchbend, 0.0f, pitchbendRange, 8192.0f, 16383.0f)
: jmap (pitchbend, -pitchbendRange, 0.0f, 0.0f, 8192.0f));
}
//==============================================================================


Loading…
Cancel
Save