diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-09 20:38:39 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-11-09 20:38:39 +0000 |
commit | 0c4c6e031a3624cfc74c2eef6e79527b7c49eca8 (patch) | |
tree | f2f9e7c1184723073075ff1ad4a3f023b1c51399 /libs/ardour/source.cc | |
parent | f7ccc404b38946c89d74e9776226b8ab4f0f6a05 (diff) |
first pass on track mode switch; fixes to dangling region refs after capture; destroy region menu item removed; small fix to SConstruct for missing C++ case; playlist selection mechanism modified ; new Selection operation added (Add); handle crashing situation with align style change handling caused by recursion
git-svn-id: svn://localhost/ardour2/trunk@1099 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/source.cc')
-rw-r--r-- | libs/ardour/source.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/ardour/source.cc b/libs/ardour/source.cc index 7ade8a8573..74ca0afcd4 100644 --- a/libs/ardour/source.cc +++ b/libs/ardour/source.cc @@ -34,6 +34,7 @@ #include <pbd/pthread_utils.h> #include <ardour/source.h> +#include <ardour/playlist.h> #include "i18n.h" @@ -47,12 +48,14 @@ Source::Source (Session& s, string name) { _name = name; _timestamp = 0; + _in_use = 0; } Source::Source (Session& s, const XMLNode& node) : _session (s) { _timestamp = 0; + _in_use = 0; if (set_state (node)) { throw failed_constructor(); @@ -106,3 +109,24 @@ Source::set_state (const XMLNode& node) return 0; } +void +Source::add_playlist (Playlist* pl) +{ + _playlists.insert (pl); +} + +void +Source::remove_playlist (Playlist* pl) +{ + std::set<Playlist*>::iterator x; + + if ((x = _playlists.find (pl)) != _playlists.end()) { + _playlists.erase (x); + } +} + +uint32_t +Source::used () const +{ + return _playlists.size(); +} |