CrossFade: merge "return" statements using "break"

This commit is contained in:
Max Kellermann 2013-10-26 13:14:16 +02:00
parent e898400fbd
commit b5e31c89c0

View File

@ -61,14 +61,14 @@ static float mixramp_interpolate(char *ramp_list, float required_db)
/* Parse the dB value. */
if (nullptr == ramp_str)
return nan("");
break;
db = (float)atof(ramp_str);
/* Parse the time. */
ramp_str = strtok_r(nullptr, ";", &save_str);
if (nullptr == ramp_str)
return nan("");
break;
secs = (float)atof(ramp_str);
@ -92,6 +92,8 @@ static float mixramp_interpolate(char *ramp_list, float required_db)
secs = last_secs + (required_db - last_db) * (secs - last_secs) / (db - last_db);
return secs;
}
return nan("");
}
unsigned cross_fade_calc(float duration, float total_time,