Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -2557,6 +2557,12 @@ void Application::displayOverlay() { · 2556 unmodified lines | |||
| 2557 | } | 2557 | } |
| 2558 | 2558 | ||
| 2559 | bool isClipping = ((_audio.getTimeSinceLastClip() > 0.f) && (_audio.getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME)); | 2559 | bool isClipping = ((_audio.getTimeSinceLastClip() > 0.f) && (_audio.getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME)); |
| 2560 | |||
| 2561 | if ((_audio.getTimeSinceLastClip() > 0.f) && (_audio.getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME)) { | ||
| 2562 | const float MAX_MAGNITUDE = 0.7f; | ||
| 2563 | float magnitude = MAX_MAGNITUDE * (1 - _audio.getTimeSinceLastClip() / CLIPPING_INDICATOR_TIME); | ||
| 2564 | renderCollisionOverlay(_glWidget->width(), _glWidget->height(), magnitude, 1.0f); | ||
| 2565 | } | ||
| 2560 | 2566 | ||
| 2561 | _audio.renderToolBox(MIRROR_VIEW_LEFT_PADDING + AUDIO_METER_GAP, | 2567 | _audio.renderToolBox(MIRROR_VIEW_LEFT_PADDING + AUDIO_METER_GAP, |
| 2562 | audioMeterY, | 2568 | audioMeterY, |