CrossFade: use sizeof(MusicChunk::data) instead of CHUNK_SIZE

This commit is contained in:
Max Kellermann 2017-12-30 17:43:23 +01:00
parent 7171e23700
commit 1194998ce9

View File

@ -105,7 +105,7 @@ CrossFadeSettings::Calculate(SignedSongTime total_time,
assert(duration >= 0);
assert(af.IsValid());
chunks_f = (float)af.GetTimeToSize() / (float)CHUNK_SIZE;
chunks_f = (float)af.GetTimeToSize() / (float)sizeof(MusicChunk::data);
if (mixramp_delay <= 0 || !mixramp_start || !mixramp_prev_end) {
chunks = (chunks_f * duration + 0.5);