Remapped volume to -55db..+5db range to match previous max level.
This commit is contained in:
parent
702a52b196
commit
811bb6207d
|
|
@ -76,8 +76,8 @@ UI.setVolume = function(x) {
|
|||
LS.save('volume', x);
|
||||
$('#openwebrx-panel-volume').val(x)
|
||||
if (audioEngine) {
|
||||
// Map 0-150 to -50..0db gain
|
||||
gain = x > 0? Math.min(1.0, Math.pow(10, ((x / 3.0) - 50) / 20)) : 0;
|
||||
// Map 0-150 to -55..+5db gain
|
||||
gain = x > 0? Math.pow(10, ((x / 2.5) - 55) / 20) : 0;
|
||||
audioEngine.setVolume(gain);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue