From 297fa9ec730aff234d50a8a977d192d761a50398 Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Tue, 21 May 2024 22:29:32 -0400 Subject: [PATCH] Rescaling volume to -40..0db gain. --- htdocs/lib/UI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/UI.js b/htdocs/lib/UI.js index 23b00a9a..4c9c705a 100644 --- a/htdocs/lib/UI.js +++ b/htdocs/lib/UI.js @@ -76,8 +76,8 @@ UI.setVolume = function(x) { LS.save('volume', x); $('#openwebrx-panel-volume').val(x) if (audioEngine) { - // Map 0..150 to -60..0db gain - gain = x > 0? Math.pow(10, ((x / 2.5) - 60) / 20) : 0; + // Map 0-150 to -40..0db gain + gain = x > 0? Math.pow(10, ((x / 3.75) - 40) / 20) : 0; audioEngine.setVolume(gain); } }