diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-27 20:57:48 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-04-27 20:57:48 +0000 |
commit | f78913cc99ffd13001b4c4daf625391be77e79d0 (patch) | |
tree | 7576a54e9312d9c3bbfd490671c3b2b6702a5c51 /libs/ardour/playlist.cc | |
parent | d1af0b89a847fbde9a30a95e0198380ff6f4e68d (diff) |
Crossfades: default xfades are now constant-power, -3dB rule, other options are constant power(-6dB) rule or use existing region fade shape as is; provide GUI control over options; fix some inconsistent behaviour regarding xfades when relayering
git-svn-id: svn://localhost/ardour2/branches/3.0@12113 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index b146f942bd..29be9ec49d 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -608,11 +608,7 @@ Playlist::flush_notifications (bool from_undo) */ } - if ( - ((regions_changed || pending_contents_change) && !in_set_state) || - pending_layering - ) { - + if (((regions_changed || pending_contents_change) && !in_set_state) || pending_layering) { relayer (); } @@ -2276,14 +2272,22 @@ Playlist::set_layer (boost::shared_ptr<Region> region, double new_layer) } void -Playlist::setup_layering_indices (RegionList const & regions) const +Playlist::setup_layering_indices (RegionList const & regions) { uint64_t j = 0; + list<Evoral::Range<framepos_t> > xf; + for (RegionList::const_iterator k = regions.begin(); k != regions.end(); ++k) { (*k)->set_layering_index (j++); + + Evoral::Range<framepos_t> r ((*k)->first_frame(), (*k)->last_frame()); + xf.push_back (r); } -} + /* now recheck the entire playlist for crossfades */ + + coalesce_and_check_crossfades (xf); +} /** Take the layering indices of each of our regions, compute the layers * that they should be on, and write the layers back to the regions. @@ -2677,12 +2681,6 @@ Playlist::shuffle (boost::shared_ptr<Region> region, int dir) if (moved) { relayer (); - - list<Evoral::Range<framepos_t> > xf; - xf.push_back (old_range); - xf.push_back (region->range ()); - coalesce_and_check_crossfades (xf); - notify_contents_changed(); } |