aboutsummaryrefslogtreecommitdiff
path: root/src/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/decode.c')
-rw-r--r--src/decode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/decode.c b/src/decode.c
index da649ece..f0c13f70 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -78,7 +78,7 @@ static unsigned calculateCrossFadeChunks(AudioFormat * af,
assert(af->channels > 0);
assert(af->sampleRate > 0);
- chunks = (af->sampleRate * af->bits * af->channels / 8.0 / CHUNK_SIZE);
+ chunks = audio_format_time_to_size(af) / CHUNK_SIZE;
chunks = (chunks * pc.crossFade + 0.5);
if (chunks > max_chunks)