From a65f63747b4602cf227f7c0699b01bba5f7cd8df Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Oct 2013 16:50:34 +0100 Subject: CrossFade: use negative value for invalid mixramp_delay Avoid NaN to allow -ffast-math. --- src/CrossFade.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/CrossFade.cxx') diff --git a/src/CrossFade.cxx b/src/CrossFade.cxx index 76820fb45..098987d19 100644 --- a/src/CrossFade.cxx +++ b/src/CrossFade.cxx @@ -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. */ -- cgit v1.2.3