Fix meter showing out of bounds

add conditional check for exception when audioLevel is NAN.
This commit is contained in:
Triplelexx 2015-02-10 23:55:56 +00:00
parent 8e0ac763eb
commit e473661568

View file

@ -883,10 +883,12 @@ void ApplicationOverlay::renderAudioMeter() {
audioLevel = AUDIO_GREEN_START;
}
// Draw Blue Quad
if (audioLevel > 0) {
glm::vec4 quadColor;
if (!isClipping) {
quadColor = AUDIO_METER_BLUE;
} else {
}
else {
quadColor = glm::vec4(1, 1, 1, 1);
}
// Draw Blue (low level) quad
@ -894,6 +896,7 @@ void ApplicationOverlay::renderAudioMeter() {
audioMeterY + AUDIO_METER_INSET,
audioLevel, AUDIO_METER_HEIGHT - AUDIO_METER_INSET, quadColor,
_audioBlueQuad);
}
}
void ApplicationOverlay::renderStatsAndLogs() {