summaryrefslogtreecommitdiff
path: root/libs/ardour/source.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-26 17:24:08 +0000
committerDavid Robillard <d@drobilla.net>2009-10-26 17:24:08 +0000
commit8d168bda874ae05b142e122cb48407ee4e1b442d (patch)
tree0f1c6d0fb7f463b66dfc521fad2e57e661f0d6f5 /libs/ardour/source.cc
parentfa5aeb7892fb73d45782b42da731bc5a51418e79 (diff)
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
Diffstat (limited to 'libs/ardour/source.cc')
-rw-r--r--libs/ardour/source.cc47
1 files changed, 0 insertions, 47 deletions
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<Playlist> pl)
-{
- std::pair<PlaylistMap::iterator,bool> res;
- std::pair<boost::shared_ptr<Playlist>, 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<Playlist> (pl)));
-}
-
-void
-Source::remove_playlist (boost::weak_ptr<Playlist> wpl)
-{
- boost::shared_ptr<Playlist> 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
{