CrossFade: use negative value for invalid mixramp_delay

Avoid NaN to allow -ffast-math.
This commit is contained in:
Max Kellermann
2013-10-30 16:50:34 +01:00
parent a21edddf27
commit a65f63747b
3 changed files with 5 additions and 6 deletions

View File

@@ -108,7 +108,7 @@ CrossFadeSettings::Calculate(float total_time,
chunks_f = (float)af.GetTimeToSize() / (float)CHUNK_SIZE;
if (std::isnan(mixramp_delay) || !mixramp_start || !mixramp_prev_end) {
if (mixramp_delay <= 0 || !mixramp_start || !mixramp_prev_end) {
chunks = (chunks_f * duration + 0.5);
} else {
/* Calculate mixramp overlap. */