summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_playlist.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-05-11 15:58:09 +0000
committerCarl Hetherington <carl@carlh.net>2011-05-11 15:58:09 +0000
commitf31b485e9008b832546378b5833b8a67e10de8e6 (patch)
treed5279eb7e91df52e6e3e76269c0d2c322ff0f35f /libs/ardour/audio_playlist.cc
parent7633066406a9405beca5f68d2d4921fd005f7b62 (diff)
Reset fades on regions copied from time ranges in other regions (#4035).
git-svn-id: svn://localhost/ardour2/branches/3.0@9494 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audio_playlist.cc')
-rw-r--r--libs/ardour/audio_playlist.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc
index c3d4bfc8de..bb4bc9c0e3 100644
--- a/libs/ardour/audio_playlist.cc
+++ b/libs/ardour/audio_playlist.cc
@@ -168,6 +168,17 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr<const AudioPlaylist> other, fram
, _crossfades (*this)
{
add_property (_crossfades);
+
+ /* Audio regions that have been created by the Playlist constructor
+ will currently have the same fade in/out as the regions that they
+ were created from. This is wrong, so reset the fades here.
+ */
+
+ for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
+ boost::shared_ptr<AudioRegion> ar = boost::dynamic_pointer_cast<AudioRegion> (*i);
+ assert (ar);
+ ar->set_default_fades ();
+ }
/* this constructor does NOT notify others (session) */
}