summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/playlist.h
diff options
context:
space:
mode:
authorJulien ROGER <gulien.roger@gmail.com>2016-11-30 17:02:20 +0100
committerPaul Davis <paul@linuxaudiosystems.com>2017-01-05 09:20:50 +0000
commit481334ae2a313e684897f3096107c2a832ca5759 (patch)
tree56d9acb58ca4ae8fed9ab62180eb692df577661c /libs/ardour/ardour/playlist.h
parent0eedb7f86609c0d9ec9ecc7a0b77fa949d158937 (diff)
Proposed fix managing shared playlists (see #7150)
Actually, when duplicating a track with "share playlist", the current playlist is owned by the new created track(orig-track-id). The sharing mecanism is made by diskstreams pointing on the same(shared) playlist. Since playlist now owned by the new track, selecting another playlist in the original track "forgets" the playlist for this track.You can't select the shared playlist anymore from the original track. This commit adds a way to keep trace of shared playlist between tracks.
Diffstat (limited to 'libs/ardour/ardour/playlist.h')
-rw-r--r--libs/ardour/ardour/playlist.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h
index 1530eede9f..bdf17eabf0 100644
--- a/libs/ardour/ardour/playlist.h
+++ b/libs/ardour/ardour/playlist.h
@@ -117,6 +117,13 @@ public:
bool hidden() const { return _hidden; }
bool empty() const;
+
+ bool shared () const { return !_shared_with_ids.empty(); }
+ void share_with (const PBD::ID&);
+ void unshare_with (const PBD::ID&);
+ bool shared_with (const PBD::ID&) const;
+ void reset_shares ();
+
uint32_t n_regions() const;
bool all_regions_empty() const;
std::pair<framepos_t, framepos_t> get_extent () const;
@@ -311,6 +318,7 @@ public:
uint32_t subcnt;
PBD::ID _orig_track_id;
uint32_t _combine_ops;
+ std::list<PBD::ID> _shared_with_ids;
void init (bool hide);