Unbreak muting

This commit is contained in:
Christopher Andrews 2024-05-21 13:33:03 +10:00
parent 2be9d73943
commit 92e6f35662
No known key found for this signature in database
GPG Key ID: 5057A0B271D87046
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ UI.setVolume = function(x) {
//Map 0-150 to -60 to 0db gain
xdb = (x / 2.5) - 60;
gain = Math.pow(10, xdb / 20);
if (x == 0) {
gain = 0;
}
if (audioEngine) audioEngine.setVolume(gain);
}
};