summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-03-31 12:44:29 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-03-31 12:44:29 +0000
commit4f7930b883d32cbb8af69a293c96e8bff3ccd916 (patch)
treed646d5b98e39028d4adb6dd9124946de78bf3c82
parentce755dd9c59dd16783bc9e94a4475a283c3e6996 (diff)
Fix for replaygain: Ensure fallback to track gain in case of missing album gain.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29664 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/replaygain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/replaygain.c b/apps/replaygain.c
index 4b6bf29dcb..3b47974d58 100644
--- a/apps/replaygain.c
+++ b/apps/replaygain.c
@@ -124,7 +124,7 @@ long convert_gain(long gain)
gain = MAX(gain,-48 * FP_ONE);
gain = MIN(gain, 17 * FP_ONE);
- return fp_factor(gain, FP_BITS) << (24 - FP_BITS);
+ return (gain) ? fp_factor(gain, FP_BITS) << (24 - FP_BITS) : 0;
}
/* Get the sample scale factor in Q19.12 format from a gain value. Returns 0