UI: Put clip detection back in to volume meter

Before the new volume meters were implemented, the meter would flash red
if the audio was clipping.  This functionality was removed when the
meters were changed, whether intentionally or unintentionally, and this
patch puts that functionality back in.  If clipping occurs, the meters
will be fully colored with the foregroundErrorColor value while the
clipping is occurring.
This commit is contained in:
jp9000 2018-01-15 09:38:18 -08:00
parent da7b8c79a2
commit 17d2a17f9e

View File

@ -733,18 +733,11 @@ void VolumeMeter::paintMeter(QPainter &painter, int x, int y,
backgroundErrorColor);
} else {
qreal end = errorLength + warningLength + nominalLength;
painter.fillRect(
minimumPosition, y,
nominalLength, height,
foregroundNominalColor);
painter.fillRect(
warningPosition, y,
warningLength, height,
foregroundWarningColor);
painter.fillRect(
errorPosition, y,
errorLength, height,
foregroundErrorColor);
end, height,
QBrush(foregroundErrorColor));
}
if (peakHoldPosition - 3 < minimumPosition) {