Commit b5e31c89 authored by Max Kellermann's avatar Max Kellermann

CrossFade: merge "return" statements using "break"

parent e898400f
...@@ -61,14 +61,14 @@ static float mixramp_interpolate(char *ramp_list, float required_db) ...@@ -61,14 +61,14 @@ static float mixramp_interpolate(char *ramp_list, float required_db)
/* Parse the dB value. */ /* Parse the dB value. */
if (nullptr == ramp_str) if (nullptr == ramp_str)
return nan(""); break;
db = (float)atof(ramp_str); db = (float)atof(ramp_str);
/* Parse the time. */ /* Parse the time. */
ramp_str = strtok_r(nullptr, ";", &save_str); ramp_str = strtok_r(nullptr, ";", &save_str);
if (nullptr == ramp_str) if (nullptr == ramp_str)
return nan(""); break;
secs = (float)atof(ramp_str); secs = (float)atof(ramp_str);
...@@ -92,6 +92,8 @@ static float mixramp_interpolate(char *ramp_list, float required_db) ...@@ -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); secs = last_secs + (required_db - last_db) * (secs - last_secs) / (db - last_db);
return secs; return secs;
} }
return nan("");
} }
unsigned cross_fade_calc(float duration, float total_time, unsigned cross_fade_calc(float duration, float total_time,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment