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

@@ -779,7 +779,7 @@ Player::PlayNextChunk()
other_chunk->tag);
other_chunk->tag = nullptr;
if (std::isnan(pc.cross_fade.mixramp_delay)) {
if (pc.cross_fade.mixramp_delay <= 0) {
chunk->mix_ratio = ((float)cross_fade_position)
/ cross_fade_chunks;
} else {