Remove unneeded zero checks from convert_gain() and get_replaygain_int(). These functions return correct results without them.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12459 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thom Johansen 2007-02-23 12:22:17 +00:00
parent c5df4f844e
commit af743c2bd6

View file

@ -287,8 +287,6 @@ static long fp_atof(const char* s, int precision)
}
static long convert_gain(long gain)
{
if (gain != 0)
{
/* Don't allow unreasonably low or high gain changes.
* Our math code can't handle it properly anyway. :)
@ -304,21 +302,13 @@ static long convert_gain(long gain)
}
gain = fp_exp10(gain / 20) << (24 - FP_BITS);
}
return gain;
}
long get_replaygain_int(long int_gain)
{
long gain = 0;
if (int_gain)
{
gain = convert_gain(int_gain * FP_ONE / 100);
}
return gain;
return convert_gain(int_gain * FP_ONE / 100);
}
long get_replaygain(const char* str)