mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Merge pull request #4782 from ctrlaltdavid/20531
DO NOT MERGE - QA for #20531 - Don't flash whole screen when audio clips
This commit is contained in:
commit
c3828e4152
1 changed files with 1 additions and 7 deletions
|
@ -889,15 +889,9 @@ void ApplicationOverlay::renderAudioMeter() {
|
|||
}
|
||||
bool isClipping = ((audio->getTimeSinceLastClip() > 0.0f) && (audio->getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME));
|
||||
|
||||
auto canvasSize = qApp->getCanvasSize();
|
||||
if ((audio->getTimeSinceLastClip() > 0.0f) && (audio->getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME)) {
|
||||
const float MAX_MAGNITUDE = 0.7f;
|
||||
float magnitude = MAX_MAGNITUDE * (1 - audio->getTimeSinceLastClip() / CLIPPING_INDICATOR_TIME);
|
||||
renderCollisionOverlay(canvasSize.x, canvasSize.y, magnitude, 1.0f);
|
||||
}
|
||||
|
||||
DependencyManager::get<AudioToolBox>()->render(MIRROR_VIEW_LEFT_PADDING + AUDIO_METER_GAP, audioMeterY, cameraSpace, boxed);
|
||||
|
||||
auto canvasSize = qApp->getCanvasSize();
|
||||
DependencyManager::get<AudioScope>()->render(canvasSize.x, canvasSize.y);
|
||||
DependencyManager::get<AudioIOStatsRenderer>()->render(WHITE_TEXT, canvasSize.x, canvasSize.y);
|
||||
|
||||
|
|
Loading…
Reference in a new issue