From 8d168bda874ae05b142e122cb48407ee4e1b442d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 26 Oct 2009 17:24:08 +0000 Subject: Remove cyclic Source->Playlist references (and with it all dependence on Playlist from Source and children and a bunch of finicky reference managing code). git-svn-id: svn://localhost/ardour2/branches/3.0@5925 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/source.cc | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'libs/ardour/source.cc') diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc index 4efd154dcd..0304bfea8a 100644 --- a/libs/ardour/source.cc +++ b/libs/ardour/source.cc @@ -36,7 +36,6 @@ #include "pbd/pthread_utils.h" #include "pbd/enumwriter.h" -#include "ardour/playlist.h" #include "ardour/session.h" #include "ardour/source.h" #include "ardour/transient_detector.h" @@ -149,52 +148,6 @@ Source::set_state (const XMLNode& node, int /*version*/) return 0; } -void -Source::add_playlist (boost::shared_ptr pl) -{ - std::pair res; - std::pair, uint32_t> newpair (pl, 1); - Glib::Mutex::Lock lm (_playlist_lock); - - res = _playlists.insert (newpair); - - if (!res.second) { - /* it already existed, bump count */ - res.first->second++; - } - - pl->GoingAway.connect (bind ( - mem_fun (*this, &Source::remove_playlist), - boost::weak_ptr (pl))); -} - -void -Source::remove_playlist (boost::weak_ptr wpl) -{ - boost::shared_ptr pl (wpl.lock()); - - if (!pl) { - return; - } - - PlaylistMap::iterator x; - Glib::Mutex::Lock lm (_playlist_lock); - - if ((x = _playlists.find (pl)) != _playlists.end()) { - if (x->second > 1) { - x->second--; - } else { - _playlists.erase (x); - } - } -} - -uint32_t -Source::used () const -{ - return _playlists.size(); -} - bool Source::has_been_analysed() const { -- cgit v1.2.3