summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-01-29 01:03:05 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-01-29 01:03:05 +0000
commitce03319dd113b8a6c109414413ad01550f774d75 (patch)
tree891940d456c8ffc059900ab398d77943f8859ebe /libs/ardour
parentab8116e725fa815d72c78d8872a2829edde8693b (diff)
prevent formation of new xfades when two regions are precisely co-terminal, and invalidate existing xfades if their participants become co-terminal
git-svn-id: svn://localhost/ardour2/branches/3.0@8605 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/audio_playlist.cc4
-rw-r--r--libs/ardour/crossfade.cc7
2 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index 01ffb0b9fb..c3d4bfc8de 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -446,6 +446,10 @@ AudioPlaylist::check_dependents (boost::shared_ptr<Region> r, bool norefresh)
continue;
}
+ if (other->position() == r->position() && other->length() == r->length()) {
+ /* precise overlay of two regions - no xfade */
+ continue;
+ }
if (other->layer() < region->layer()) {
top = region;
diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc
index 47b07dc38d..302b19399e 100644
--- a/libs/ardour/crossfade.cc
+++ b/libs/ardour/crossfade.cc
@@ -441,6 +441,13 @@ Crossfade::refresh ()
Invalidated (shared_from_this());
return false;
}
+
+ /* regions must cannot be identically sized and placed */
+
+ if (_in->position() == _out->position() && _in->length() == _out->length()) {
+ Invalidated (shared_from_this());
+ return false;
+ }
/* layer ordering cannot change */