From f519f469b27fdd748acf483a4f03994c1fc6ae4c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 10 Jun 2012 13:07:28 +0000 Subject: [PATCH] Fix off-by-one in computation of crossfade lengths. git-svn-id: svn://localhost/ardour2/branches/3.0@12642 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/audio_playlist.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index 6653e2f655..c1b6bb6e6d 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -335,7 +335,7 @@ AudioPlaylist::check_crossfades (Evoral::Range range) } else { switch (_session.config.get_xfade_model()) { case FullCrossfade: - len = bottom->last_frame () - top->first_frame (); + len = bottom->last_frame () - top->first_frame () + 1; top->set_fade_in_is_short (false); break; case ShortCrossfade: @@ -395,7 +395,7 @@ AudioPlaylist::check_crossfades (Evoral::Range range) } else { switch (_session.config.get_xfade_model()) { case FullCrossfade: - len = top->last_frame () - bottom->first_frame (); + len = top->last_frame () - bottom->first_frame () + 1; break; case ShortCrossfade: len = _session.config.get_short_xfade_seconds() * _session.frame_rate();