aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-08-23 18:34:30 -0700
committerEric Wong <normalperson@yhbt.net>2008-08-23 18:34:30 -0700
commita33910f3469617e79ec37c429138e91b64bd827b (patch)
tree77724246caa96f796f1c027cc5f43c7add6d841f /src
parentc75096cf5bdb94e47602117cde9f2f3d58b3e701 (diff)
downloadmpd-a33910f3469617e79ec37c429138e91b64bd827b.tar.gz
mpd-a33910f3469617e79ec37c429138e91b64bd827b.tar.xz
mpd-a33910f3469617e79ec37c429138e91b64bd827b.zip
don't crossfade different audio formats
It sounds nasty and we didn't do it before the core-rewrite
Diffstat (limited to '')
-rw-r--r--src/outputBuffer_xfade.h6
1 files 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);