From a33910f3469617e79ec37c429138e91b64bd827b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 23 Aug 2008 18:34:30 -0700 Subject: don't crossfade different audio formats It sounds nasty and we didn't do it before the core-rewrite --- src/outputBuffer_xfade.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/outputBuffer_xfade.h b/src/outputBuffer_xfade.h index 80efe704e..a2a6b0c38 100644 --- a/src/outputBuffer_xfade.h +++ b/src/outputBuffer_xfade.h @@ -15,9 +15,11 @@ static size_t calculate_xfade_chunks(struct iovec vec[2]) assert(pthread_equal(ob.thread, pthread_self())); + if (!isCurrentAudioFormat(af)) + return 0; + if (!ob.total_time || - (ob.elapsed_time + ob.xfade_time) < ob.total_time || - !isCurrentAudioFormat(af)) + (ob.elapsed_time + ob.xfade_time) < ob.total_time) return ob.bpp_cur; /* too early, don't enable xfade yet */ assert(af->bits > 0); -- cgit v1.2.3