13
0

always check_dependents() after a relayer() (useful for LaterHigher model), don't create end crossfades for external overlaps unless they are at the top layer

git-svn-id: svn://localhost/ardour2/trunk@1172 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2006-11-30 14:21:02 +00:00
parent e002eea388
commit 9cca1464a8
2 changed files with 15 additions and 13 deletions

View File

@ -425,8 +425,15 @@ AudioPlaylist::check_dependents (boost::shared_ptr<Region> r, bool norefresh)
/* in, out */
xfade = new Crossfade (top, bottom, xfade_length, top->first_frame(), StartOfIn);
add_crossfade (*xfade);
xfade = new Crossfade (bottom, top, xfade_length, top->last_frame() - xfade_length, EndOfOut);
add_crossfade (*xfade);
if (top_region_at (top->last_frame() - 1) == top) {
/*
only add a fade out if there is no region on top of the end of 'top' (which
would cover it).
*/
xfade = new Crossfade (bottom, top, xfade_length, top->last_frame() - xfade_length, EndOfOut);
add_crossfade (*xfade);
}
} else {

View File

@ -404,12 +404,8 @@ Playlist::flush_notifications ()
timestamp_layer_op (*r);
}
pending_length = true;
n++;
}
for (RegionList::iterator r = pending_bounds.begin(); r != pending_bounds.end(); ++r) {
dependent_checks_needed.insert (*r);
/* don't increment n again - its the same list */
n++;
}
for (s = pending_adds.begin(); s != pending_adds.end(); ++s) {
@ -417,10 +413,6 @@ Playlist::flush_notifications ()
n++;
}
for (s = dependent_checks_needed.begin(); s != dependent_checks_needed.end(); ++s) {
check_dependents (*s, false);
}
for (s = pending_removes.begin(); s != pending_removes.end(); ++s) {
remove_dependents (*s);
n++;
@ -441,6 +433,10 @@ Playlist::flush_notifications ()
Modified (); /* EMIT SIGNAL */
}
for (s = dependent_checks_needed.begin(); s != dependent_checks_needed.end(); ++s) {
check_dependents (*s, false);
}
pending_adds.clear ();
pending_removes.clear ();
pending_bounds.clear ();
@ -1111,7 +1107,6 @@ Playlist::region_bounds_changed (Change what_changed, boost::shared_ptr<Region>
}
if (what_changed & Change (ARDOUR::PositionChanged|ARDOUR::LengthChanged)) {
if (holding_state ()) {
pending_bounds.push_back (region);
} else {
@ -1121,9 +1116,9 @@ Playlist::region_bounds_changed (Change what_changed, boost::shared_ptr<Region>
}
possibly_splice ();
check_dependents (region, false);
notify_length_changed ();
relayer ();
check_dependents (region, false);
}
}
}