Skip to content

Commit

Permalink
make use of max_db
Browse files Browse the repository at this point in the history
  • Loading branch information
dasl- authored Jul 8, 2023
1 parent baf51cf commit 3479d8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ double logarithmic_vol2attn(double vol, long max_db, long min_db) {
return min_db;
}

vol_setting = 1000 * log10(vol_pct) / log10(2); // This will be in the range [-inf, 0]
vol_setting = max_db + 1000 * log10(vol_pct) / log10(2); // This will be in the range [-inf, max_db]
if (vol_setting < min_db) {
return min_db;
}
Expand Down

0 comments on commit 3479d8d

Please sign in to comment.