From 36c41a1fd32c4c8eb7b4f70bfb03b11c186112f8 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Tue, 1 Apr 2014 15:35:46 -0700 Subject: [PATCH] test other way of doing loudness --- interface/interface_en.ts | 12 ++++++------ interface/src/Application.cpp | 7 +++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/interface/interface_en.ts b/interface/interface_en.ts index a1abb57b52..709cea840d 100644 --- a/interface/interface_en.ts +++ b/interface/interface_en.ts @@ -14,12 +14,12 @@ - + Open Script - + JavaScript Files (*.js) @@ -113,18 +113,18 @@ Menu - + Open .ini config file - - + + Text files (*.ini) - + Save .ini config file diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a237e92e2b..e0c26f3f14 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2540,6 +2540,13 @@ void Application::displayOverlay() { audioLevel = log2loudness / MAX_LOG2_SAMPLE * AUDIO_METER_SCALE_WIDTH; + + if (log2loudness <= 11.f) { + audioLevel = log2loudness / 11.f * AUDIO_METER_SCALE_WIDTH / 5.f; + } else { + audioLevel = (log2loudness - 10.f) * AUDIO_METER_SCALE_WIDTH / 5.f; + } + bool isClipping = ((_audio.getTimeSinceLastClip() > 0.f) && (_audio.getTimeSinceLastClip() < CLIPPING_INDICATOR_TIME)); glBegin(GL_QUADS);