X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudio_playlist.cc;h=1ecba28653f615f44838ed73c4a0c83c42bd8a45;hb=c83389b8ec5fef9553a401e6123b7e55702af9e2;hp=812aa8783ba301f22989ae9da79d7d29da3af484;hpb=79f91c7a205d981d2b8cc15e32a6da02d8423065;p=ardour.git diff --git a/libs/ardour/audio_playlist.cc b/libs/ardour/audio_playlist.cc index 812aa8783b..1ecba28653 100644 --- a/libs/ardour/audio_playlist.cc +++ b/libs/ardour/audio_playlist.cc @@ -21,7 +21,6 @@ #include -#include #include "ardour/types.h" #include "ardour/configuration.h" @@ -35,7 +34,6 @@ #include "i18n.h" using namespace ARDOUR; -using namespace sigc; using namespace std; using namespace PBD; @@ -46,7 +44,7 @@ AudioPlaylist::AudioPlaylist (Session& session, const XMLNode& node, bool hidden assert(!prop || DataType(prop->value()) == DataType::AUDIO); in_set_state++; - set_state (node); + set_state (node, Stateful::loading_state_version); in_set_state--; } @@ -104,12 +102,6 @@ AudioPlaylist::AudioPlaylist (boost::shared_ptr other, nfra AudioPlaylist::~AudioPlaylist () { - GoingAway (); /* EMIT SIGNAL */ - - /* drop connections to signals */ - - notify_callbacks (); - _crossfades.clear (); } @@ -351,7 +343,7 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) boost::shared_ptr top; boost::shared_ptr bottom; boost::shared_ptr xfade; - RegionList* touched_regions; + RegionList* touched_regions = 0; if (in_set_state || in_partition) { return; @@ -401,6 +393,9 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) OverlapType c = top->coverage (bottom->position(), bottom->last_frame()); + delete touched_regions; + touched_regions = 0; + try { switch (c) { case OverlapNone: @@ -509,6 +504,8 @@ AudioPlaylist::check_dependents (boost::shared_ptr r, bool norefresh) } } + + delete touched_regions; } void @@ -527,8 +524,8 @@ AudioPlaylist::add_crossfade (boost::shared_ptr xfade) } else { _crossfades.push_back (xfade); - xfade->Invalidated.connect (mem_fun (*this, &AudioPlaylist::crossfade_invalidated)); - xfade->StateChanged.connect (mem_fun (*this, &AudioPlaylist::crossfade_changed)); + xfade->Invalidated.connect_same_thread (*this, boost::bind (&AudioPlaylist::crossfade_invalidated, this, _1)); + xfade->StateChanged.connect_same_thread (*this, boost::bind (&AudioPlaylist::crossfade_changed, this, _1)); notify_crossfade_added (xfade); } @@ -566,7 +563,7 @@ AudioPlaylist::set_state (const XMLNode& node, int version) in_set_state++; - Playlist::set_state (node); + Playlist::set_state (node, version); freeze (); @@ -583,8 +580,8 @@ AudioPlaylist::set_state (const XMLNode& node, int version) try { boost::shared_ptr xfade = boost::shared_ptr (new Crossfade (*((const Playlist *)this), *child)); _crossfades.push_back (xfade); - xfade->Invalidated.connect (mem_fun (*this, &AudioPlaylist::crossfade_invalidated)); - xfade->StateChanged.connect (mem_fun (*this, &AudioPlaylist::crossfade_changed)); + xfade->Invalidated.connect_same_thread (*this, boost::bind (&AudioPlaylist::crossfade_invalidated, this, _1)); + xfade->StateChanged.connect_same_thread (*this, boost::bind (&AudioPlaylist::crossfade_changed, this, _1)); NewCrossfade(xfade); } @@ -787,7 +784,7 @@ AudioPlaylist::crossfades_at (nframes_t frame, Crossfades& clist) } void -AudioPlaylist::foreach_crossfade (sigc::slot > s) +AudioPlaylist::foreach_crossfade (boost::function)> s) { RegionLock rl (this, false); for (Crossfades::iterator i = _crossfades.begin(); i != _crossfades.end(); ++i) {