Skip to content

Commit

Permalink
Fix dbov value not capped to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mickhopes committed Mar 29, 2023
1 parent 919b454 commit 4e852ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audiofilters/msvolume.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ int ms_volume_linear_to_dbov(float linear) {
}

int ms_volume_dbm0_to_dbov(float dbm0) {
return (int)dbm0 + 3;
return dbm0 > -3.0 ? -3 : (int)dbm0 + 3;
}

float ms_volume_dbov_to_dbm0(int dbov) {
Expand Down

0 comments on commit 4e852ac

Please sign in to comment.