mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 09:23:17 +02:00
Fix meter showing out of bounds
add conditional check for exception when audioLevel is NAN.
This commit is contained in:
parent
8e0ac763eb
commit
e473661568
1 changed files with 14 additions and 11 deletions
|
@ -883,17 +883,20 @@ void ApplicationOverlay::renderAudioMeter() {
|
|||
audioLevel = AUDIO_GREEN_START;
|
||||
}
|
||||
// Draw Blue Quad
|
||||
glm::vec4 quadColor;
|
||||
if (!isClipping) {
|
||||
quadColor = AUDIO_METER_BLUE;
|
||||
} else {
|
||||
quadColor = glm::vec4(1, 1, 1, 1);
|
||||
}
|
||||
// Draw Blue (low level) quad
|
||||
DependencyManager::get<GeometryCache>()->renderQuad(AUDIO_METER_X + AUDIO_METER_INSET,
|
||||
audioMeterY + AUDIO_METER_INSET,
|
||||
audioLevel, AUDIO_METER_HEIGHT - AUDIO_METER_INSET, quadColor,
|
||||
_audioBlueQuad);
|
||||
if (audioLevel > 0) {
|
||||
glm::vec4 quadColor;
|
||||
if (!isClipping) {
|
||||
quadColor = AUDIO_METER_BLUE;
|
||||
}
|
||||
else {
|
||||
quadColor = glm::vec4(1, 1, 1, 1);
|
||||
}
|
||||
// Draw Blue (low level) quad
|
||||
DependencyManager::get<GeometryCache>()->renderQuad(AUDIO_METER_X + AUDIO_METER_INSET,
|
||||
audioMeterY + AUDIO_METER_INSET,
|
||||
audioLevel, AUDIO_METER_HEIGHT - AUDIO_METER_INSET, quadColor,
|
||||
_audioBlueQuad);
|
||||
}
|
||||
}
|
||||
|
||||
void ApplicationOverlay::renderStatsAndLogs() {
|
||||
|
|
Loading…
Reference in a new issue