Issue on LevelMeasurer::Client::updateMidiLevel

Hi all,
I think i found an issue on the LevelMeasurer::Client::updateMidiLevel(…) method :

void LevelMeasurer::Client::updateMidiLevel (DbTimePair newMidiLevel) noexcept
{
    juce::SpinLock::ScopedLockType sl (mutex);
    
    if (midiLevels.dB >= midiLevels.dB)
        midiLevels = newMidiLevel;
}

I think that the if condition should be newMidiLevel.dB >= midiLevels.dB and not midiLevels.dB >= midiLevels.dB otherwise the measurer for midi does not work correctly.

Good spot, thanks! Fixed here:

1 Like