prevent formation of new xfades when two regions are precisely co-terminal, and inval...
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 29 Jan 2011 01:03:05 +0000 (01:03 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Sat, 29 Jan 2011 01:03:05 +0000 (01:03 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8605 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audio_playlist.cc
libs/ardour/crossfade.cc

index 01ffb0b9fb28746846ab2df7b1c28d7ce0face07..c3d4bfc8de9627b404c6f416d950a4d8a7eaba51 100644 (file)
@@ -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;
index 47b07dc38defc3329e06072094bbda87097a81f1..302b19399e7d34fcc10ecf2b4f6f0544a2db698d 100644 (file)
@@ -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 */