diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-08-23 18:34:30 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-08-23 18:34:30 -0700 |
commit | a33910f3469617e79ec37c429138e91b64bd827b (patch) | |
tree | 77724246caa96f796f1c027cc5f43c7add6d841f | |
parent | c75096cf5bdb94e47602117cde9f2f3d58b3e701 (diff) | |
download | mpd-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
-rw-r--r-- | src/outputBuffer_xfade.h | 6 |
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); |