Ignore empty strength values

This commit is contained in:
Mashintime 2023-02-14 16:13:48 -05:00
parent d7beebcce7
commit 190f9b3d3a

View file

@ -1900,7 +1900,9 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
// noise / strength // noise / strength
// https://www.moellerstudios.org/converting-amplitude-representations/ // https://www.moellerstudios.org/converting-amplitude-representations/
if (noise_level_raw != arg.strength) {
if (arg.strength != "" && noise_level_raw != arg.strength) {
//console.log(arg.strength);
noise_level_raw = arg.strength; noise_level_raw = arg.strength;
noise_level = Math.pow(10, arg.strength / 20) * 100; noise_level = Math.pow(10, arg.strength / 20) * 100;