diff options
Diffstat (limited to 'src/devices/sound/mas3507d.cpp')
-rw-r--r-- | src/devices/sound/mas3507d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/sound/mas3507d.cpp b/src/devices/sound/mas3507d.cpp index 11c2c79e8b7..d1a4e380609 100644 --- a/src/devices/sound/mas3507d.cpp +++ b/src/devices/sound/mas3507d.cpp @@ -257,12 +257,12 @@ int gain_to_db(double val) { } float gain_to_percentage(int val) { - double db = gain_to_db(val); - - if (db == 0) { + if (val == 0) { return 0; // Special case for muting it seems } + double db = gain_to_db(val); + return powf(10.0, (db + 6) / 20.0); } |