UI: Fix low value of std::clamp gets greater than high value
`std::clamp` was introduced at 60a45d3aa3 but it caused a runtime
assertion failure on Windows that checks the low value of `std::clamp`
is not greater than the high value.
This commit is contained in:
parent
612ef65726
commit
06642fdee4
1 changed files with 1 additions and 1 deletions
|
|
@ -1008,7 +1008,7 @@ VolumeMeter::calculateBallisticsForChannel(int channelNr, uint64_t ts,
|
|||
float decay = float(peakDecayRate * timeSinceLastRedraw);
|
||||
displayPeak[channelNr] =
|
||||
std::clamp(displayPeak[channelNr] - decay,
|
||||
currentPeak[channelNr], 0.f);
|
||||
std::min(currentPeak[channelNr], 0.f), 0.f);
|
||||
}
|
||||
|
||||
if (currentPeak[channelNr] >= displayPeakHold[channelNr] ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue