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

Minor clean-ups.

This commit is contained in:
jules 2012-12-31 19:10:54 +00:00
parent 5f8069719e
commit 7a3453f48b
32 changed files with 219 additions and 277 deletions

View file

@ -286,16 +286,16 @@ void Synthesiser::noteOff (const int midiChannel,
if (voice->getCurrentlyPlayingNote() == midiNoteNumber)
{
SynthesiserSound* const sound = voice->getCurrentlyPlayingSound();
if (sound != nullptr
&& sound->appliesToNote (midiNoteNumber)
&& sound->appliesToChannel (midiChannel))
if (SynthesiserSound* const sound = voice->getCurrentlyPlayingSound())
{
voice->keyIsDown = false;
if (sound->appliesToNote (midiNoteNumber)
&& sound->appliesToChannel (midiChannel))
{
voice->keyIsDown = false;
if (! (sustainPedalsDown [midiChannel] || voice->sostenutoPedalDown))
stopVoice (voice, allowTailOff);
if (! (sustainPedalsDown [midiChannel] || voice->sostenutoPedalDown))
stopVoice (voice, allowTailOff);
}
}
}
}