Prettified Code!

This commit is contained in:
Mashintime 2023-02-26 23:41:51 +00:00 committed by GitHub Action
parent 2f468d21c7
commit e7ebff3f11

View file

@ -1940,7 +1940,11 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
}
// dbfs
// https://www.moellerstudios.org/converting-amplitude-representations/
if (arg.dbfs_level.length != 0 && !isNaN(arg.dbfs_level) && dbfs_level_raw != arg.dbfs_level) {
if (
arg.dbfs_level.length != 0 &&
!isNaN(arg.dbfs_level) &&
dbfs_level_raw != arg.dbfs_level
) {
dbfs_level_raw = arg.dbfs_level;
dbfs_level = Math.pow(10, arg.dbfs_level / 20) * 100;
@ -1955,7 +1959,11 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
// noise / strength
// https://www.moellerstudios.org/converting-amplitude-representations/
if (arg.strength.length != 0 && !isNaN(arg.strength) && noise_level_raw != arg.strength) {
if (
arg.strength.length != 0 &&
!isNaN(arg.strength) &&
noise_level_raw != arg.strength
) {
//console.log(arg.strength);
noise_level_raw = arg.strength;
noise_level = Math.pow(10, arg.strength / 20) * 100;