summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/playlist.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-29 22:14:15 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-29 22:14:15 +0000
commitb1775149307a157444c516693ad6b98a404ef1b2 (patch)
treeffdf04d8396cf53d5378c073a8d249150d5282eb /libs/ardour/ardour/playlist.h
parentcabb76cce6203d34299136371078bd20b6abe1e3 (diff)
Revert internals of the last layering-related commit, and go back a slightly-cleaned-up version of how it was before. Remove all layering modes; only option now is add-is-higher. Move-add-higher could easily be re-added if anyone uses it.
git-svn-id: svn://localhost/ardour2/branches/3.0@11111 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/playlist.h')
-rw-r--r--libs/ardour/ardour/playlist.h75
1 files changed, 2 insertions, 73 deletions
diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h
index a8be02a0b9..a7ead83eef 100644
--- a/libs/ardour/ardour/playlist.h
+++ b/libs/ardour/ardour/playlist.h
@@ -44,9 +44,6 @@
#include "ardour/session_object.h"
#include "ardour/data_type.h"
-class PlaylistOverlapCacheTest;
-class PlaylistLayeringTest;
-
namespace ARDOUR {
class Session;
@@ -225,10 +222,7 @@ public:
framepos_t find_next_top_layer_position (framepos_t) const;
uint32_t combine_ops() const { return _combine_ops; }
- void relayer (boost::shared_ptr<Region>);
- void relayer (boost::shared_ptr<Region>, double);
- void suspend_relayer ();
- void resume_relayer ();
+ uint64_t highest_layering_index () const;
protected:
friend class Session;
@@ -355,7 +349,7 @@ public:
boost::shared_ptr<Playlist> cut (framepos_t start, framecnt_t cnt, bool result_is_hidden);
boost::shared_ptr<Playlist> copy (framepos_t start, framecnt_t cnt, bool result_is_hidden);
- void relayer (RegionList const &);
+ void relayer ();
void begin_undo ();
void end_undo ();
@@ -382,71 +376,6 @@ public:
with its constituent regions
*/
virtual void pre_uncombine (std::vector<boost::shared_ptr<Region> >&, boost::shared_ptr<Region>) {}
-
-private:
- friend class ::PlaylistOverlapCacheTest;
- friend class ::PlaylistLayeringTest;
-
- /** A class which is used to store temporary (fractional)
- * layer assignments for some regions.
- */
- class TemporaryLayers
- {
- public:
- void set (boost::shared_ptr<Region>, double);
- double get (boost::shared_ptr<Region>) const;
-
- private:
- typedef std::map<boost::shared_ptr<Region>, double> Map;
- Map _map;
- };
-
- /** Class to sort by temporary layer, for use with std::list<>::sort() */
- class SortByTemporaryLayer
- {
- public:
- SortByTemporaryLayer (TemporaryLayers const & t)
- : _temporary_layers (t) {}
-
- bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b) const {
- return _temporary_layers.get (a) < _temporary_layers.get (b);
- }
-
- private:
- Playlist::TemporaryLayers const & _temporary_layers;
- };
-
- /** A cache of what overlaps what, for a given playlist in a given state.
- * Divides a playlist up into time periods and notes which regions cover those
- * periods, so that get() is reasonably quick.
- */
- class OverlapCache
- {
- public:
- OverlapCache (Playlist *);
-
- RegionList get (Evoral::Range<framepos_t>) const;
-
- private:
- std::pair<int, int> cache_indices (Evoral::Range<framepos_t>) const;
-
- double _division_size;
- std::vector<RegionList> _cache;
- Evoral::Range<framepos_t> _range;
-
- static int const _divisions;
- };
-
- TemporaryLayers compute_temporary_layers (RegionList const &);
- void commit_temporary_layers (TemporaryLayers const &);
-
- RegionList recursive_regions_touched (boost::shared_ptr<Region>, OverlapCache const &, boost::shared_ptr<Region>) const;
- void recursive_regions_touched_sub (boost::shared_ptr<Region>, OverlapCache const &, boost::shared_ptr<Region>, RegionList &) const;
-
- void timestamp_layer_op (LayerOp, boost::shared_ptr<Region>);
- uint64_t layer_op_counter;
-
- bool _relayer_suspended;
};
} /* namespace ARDOUR */