diff --git a/libs/ardour/ardour/playlist.h b/libs/ardour/ardour/playlist.h index babbd84e23..02b9e25157 100644 --- a/libs/ardour/ardour/playlist.h +++ b/libs/ardour/ardour/playlist.h @@ -146,10 +146,8 @@ public: const DataType& data_type () const { return _type; } bool hidden () const { return _hidden; } bool shared () const { return !_shared_with_ids.empty (); } - EditMode get_edit_mode () const { return _edit_mode; } void set_frozen (bool yn); - void set_edit_mode (EditMode); void AddToSoloSelectedList (const Region*); void RemoveFromSoloSelectedList (const Region*); @@ -375,7 +373,6 @@ protected: bool _shuffling; bool _nudging; uint32_t _refcnt; - EditMode _edit_mode; bool in_flush; bool in_partition; bool _frozen; diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 1ea224d800..516f66954c 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -437,7 +437,6 @@ enum MeterHold { enum EditMode { Slide, - Splice, Ripple, RippleAll, Lock diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 3abba0e50c..cf32e93db2 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -304,7 +304,6 @@ setup_enum_writer () REGISTER (_InputMeterLayout); REGISTER_ENUM (Slide); - REGISTER_ENUM (Splice); REGISTER_ENUM (Ripple); REGISTER_ENUM (RippleAll); REGISTER_ENUM (Lock); diff --git a/libs/ardour/luabindings.cc b/libs/ardour/luabindings.cc index 4fc7cfa950..e94a3dbf2c 100644 --- a/libs/ardour/luabindings.cc +++ b/libs/ardour/luabindings.cc @@ -2234,7 +2234,6 @@ LuaBindings::common (lua_State* L) .beginNamespace ("EditMode") .addConst ("Slide", ARDOUR::EditMode(Slide)) - .addConst ("Splice", ARDOUR::EditMode(Splice)) .addConst ("Ripple", ARDOUR::EditMode(Ripple)) .addConst ("Lock", ARDOUR::EditMode(Lock)) .endNamespace () diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index b1811fd115..2224bfd997 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -194,7 +194,6 @@ Playlist::Playlist (boost::shared_ptr other, string namestr, boo _splicing = other->_splicing; _rippling = other->_rippling; _nudging = other->_nudging; - _edit_mode = other->_edit_mode; in_set_state = 0; first_set_state = false; @@ -293,8 +292,9 @@ Playlist::Playlist (boost::shared_ptr other, samplepos_t start, thawlist.release (); - /* keep track of any dead space at end (for pasting into Ripple or Splice mode) - * at the end of construction, any length of cnt beyond the extents of the regions is end_space + /* keep track of any dead space at end (for pasting into Ripple or + * RippleAll mode) at the end of construction, any length of cnt beyond + * the extents of the regions is end_space */ _end_space = cnt - (get_extent ().second - get_extent ().first); @@ -350,7 +350,6 @@ Playlist::init (bool hide) _nudging = false; in_set_state = 0; in_undo = false; - _edit_mode = Config->get_edit_mode (); in_flush = false; in_partition = false; subcnt = 0; @@ -1208,7 +1207,7 @@ Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting, in_partition = false; } - /* keep track of any dead space at end (for pasting into Ripple or Splice mode) */ + /* keep track of any dead space at end (for pasting into Ripple or RippleAll mode) */ samplepos_t wanted_length = end - start; _end_space = wanted_length - _get_extent ().second - _get_extent ().first; } @@ -1594,67 +1593,6 @@ Playlist::SoloSelectedActive () return !_soloSelectedRegions.empty (); } -void -Playlist::possibly_splice (samplepos_t at, samplecnt_t distance, boost::shared_ptr exclude) -{ - if (_splicing || in_set_state) { - /* don't respond to splicing moves or state setting */ - return; - } - - if (_edit_mode == Splice) { - splice_locked (at, distance, exclude); - } -} - -void -Playlist::possibly_splice_unlocked (samplepos_t at, samplecnt_t distance, boost::shared_ptr exclude, ThawList& thawlist) -{ - if (_splicing || in_set_state) { - /* don't respond to splicing moves or state setting */ - return; - } - - if (_edit_mode == Splice) { - splice_unlocked (at, distance, exclude, thawlist); - } -} - -void -Playlist::splice_locked (samplepos_t at, samplecnt_t distance, boost::shared_ptr exclude) -{ - RegionWriteLock rl (this); - splice_unlocked (at, distance, exclude, rl.thawlist); -} - -void -Playlist::splice_unlocked (samplepos_t at, samplecnt_t distance, boost::shared_ptr exclude, ThawList& thawlist) -{ - _splicing = true; - - for (RegionList::iterator i = regions.begin (); i != regions.end (); ++i) { - if (exclude && (*i) == exclude) { - continue; - } - - if ((*i)->position () >= at) { - samplepos_t new_pos = (*i)->position () + distance; - if (new_pos < 0) { - new_pos = 0; - } else if (new_pos >= max_samplepos - (*i)->length ()) { - new_pos = max_samplepos - (*i)->length (); - } - - thawlist.add (*i); - (*i)->set_position (new_pos); - } - } - - _splicing = false; - - notify_contents_changed (); -} - void Playlist::ripple (samplepos_t at, samplecnt_t distance, RegionList* exclude) { @@ -2543,12 +2481,6 @@ Playlist::top_layer () const return top; } -void -Playlist::set_edit_mode (EditMode mode) -{ - _edit_mode = mode; -} - struct RelayerSort { bool operator() (boost::shared_ptr a, boost::shared_ptr b) { diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index e8fba3fdc0..ade58170ad 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -4127,14 +4127,6 @@ Session::config_changed (std::string p, bool ours) } } - } else if (p == "edit-mode") { - - Glib::Threads::Mutex::Lock lm (_playlists->lock); - - for (SessionPlaylists::List::iterator i = _playlists->playlists.begin(); i != _playlists->playlists.end(); ++i) { - (*i)->set_edit_mode (Config->get_edit_mode ()); - } - } else if (p == "use-video-sync") { waiting_for_sync_offset = config.get_use_video_sync(); diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 16b37f7a31..ec526637ef 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -415,9 +415,7 @@ ARDOUR::compute_equal_power_fades (samplecnt_t nframes, float* in, float* out) EditMode ARDOUR::string_to_edit_mode (string str) { - if (str == _("Splice")) { - return Splice; - } else if (str == _("Slide")) { + if (str == _("Slide")) { return Slide; } else if (str == _("Ripple")) { return Ripple; @@ -435,9 +433,6 @@ const char* ARDOUR::edit_mode_to_string (EditMode mode) { switch (mode) { - case Slide: - return _("Slide"); - case Lock: return _("Lock"); @@ -448,8 +443,8 @@ ARDOUR::edit_mode_to_string (EditMode mode) return _("Ripple All"); default: - case Splice: - return _("Splice"); + case Slide: + return _("Slide"); } }