aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/replay_gain_info.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/replay_gain_info.c b/src/replay_gain_info.c
index 66f46def2..3b4ab4577 100644
--- a/src/replay_gain_info.c
+++ b/src/replay_gain_info.c
@@ -25,19 +25,16 @@ replay_gain_tuple_scale(const struct replay_gain_tuple *tuple, float preamp, flo
{
float scale;
- if (replay_gain_tuple_defined(tuple))
- {
- scale = pow(10.0, tuple->gain / 20.0);
- scale *= preamp;
- if (scale > 15.0)
- scale = 15.0;
+ if (replay_gain_tuple_defined(tuple)) {
+ scale = pow(10.0, tuple->gain / 20.0);
+ scale *= preamp;
+ if (scale > 15.0)
+ scale = 15.0;
- if (peak_limit)
- if (scale * tuple->peak > 1.0)
+ if (peak_limit && scale * tuple->peak > 1.0)
scale = 1.0 / tuple->peak;
- } else {
+ } else
scale = missing_preamp;
- }
return scale;
}