summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_playlist.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-04-18 22:23:12 +0000
committerCarl Hetherington <carl@carlh.net>2012-04-18 22:23:12 +0000
commit1ea4b09d5d11212853ab8139200f26bfa19498b7 (patch)
treed1320639260bfe96be8b698f360750336e8a243f /libs/ardour/audio_playlist.cc
parent2072261bb07aac3d84f2cb0959042f5289f200dc (diff)
Add drawing.
git-svn-id: svn://localhost/ardour2/branches/3.0@12023 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_playlist.cc')
-rw-r--r--libs/ardour/audio_playlist.cc30
1 files changed, 24 insertions, 6 deletions
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index 47b2a5809a..06f9b3bc65 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -313,12 +313,21 @@ AudioPlaylist::check_crossfades (Evoral::Range<framepos_t> range)
*/
if (done_start.find (top) == done_start.end() && done_end.find (bottom) == done_end.end ()) {
- framecnt_t const len = bottom->last_frame () - top->first_frame ();
+ /* Top's fade-in will cause an implicit fade-out of bottom */
+
+ framecnt_t len = 0;
+ switch (_session.config.get_xfade_model()) {
+ case FullCrossfade:
+ len = bottom->last_frame () - top->first_frame ();
+ break;
+ case ShortCrossfade:
+ len = _session.config.get_short_xfade_seconds() * _session.frame_rate();
+ break;
+ }
+
top->set_fade_in_length (len);
top->set_fade_in_active (true);
done_start.insert (top);
- bottom->set_fade_out_length (len);
- bottom->set_fade_out_active (true);
done_end.insert (bottom);
}
@@ -331,12 +340,21 @@ AudioPlaylist::check_crossfades (Evoral::Range<framepos_t> range)
*/
if (done_end.find (top) == done_end.end() && done_start.find (bottom) == done_start.end ()) {
- framecnt_t const len = top->last_frame () - bottom->first_frame ();
+ /* Top's fade-out will cause an implicit fade-in of bottom */
+
+ framecnt_t len = 0;
+ switch (_session.config.get_xfade_model()) {
+ case FullCrossfade:
+ len = bottom->last_frame () - top->first_frame ();
+ break;
+ case ShortCrossfade:
+ len = _session.config.get_short_xfade_seconds() * _session.frame_rate();
+ break;
+ }
+
top->set_fade_out_length (len);
top->set_fade_out_active (true);
done_end.insert (top);
- bottom->set_fade_in_length (len);
- bottom->set_fade_in_active (true);
done_start.insert (bottom);
}
}