1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Andree Buschmann 2011-03-31 12:44:29 +00:00
parent ce755dd9c5
commit 4f7930b883

View file

@ -124,7 +124,7 @@ long convert_gain(long gain)
gain = MAX(gain,-48 * FP_ONE); gain = MAX(gain,-48 * FP_ONE);
gain = MIN(gain, 17 * 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 /* Get the sample scale factor in Q19.12 format from a gain value. Returns 0