mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
we removed Splice mode from the GUI 7 years ago; now remove all code related to Splice mode
This commit is contained in:
parent
ece174ca47
commit
43c713d0ef
7 changed files with 7 additions and 94 deletions
|
|
@ -146,10 +146,8 @@ public:
|
||||||
const DataType& data_type () const { return _type; }
|
const DataType& data_type () const { return _type; }
|
||||||
bool hidden () const { return _hidden; }
|
bool hidden () const { return _hidden; }
|
||||||
bool shared () const { return !_shared_with_ids.empty (); }
|
bool shared () const { return !_shared_with_ids.empty (); }
|
||||||
EditMode get_edit_mode () const { return _edit_mode; }
|
|
||||||
|
|
||||||
void set_frozen (bool yn);
|
void set_frozen (bool yn);
|
||||||
void set_edit_mode (EditMode);
|
|
||||||
|
|
||||||
void AddToSoloSelectedList (const Region*);
|
void AddToSoloSelectedList (const Region*);
|
||||||
void RemoveFromSoloSelectedList (const Region*);
|
void RemoveFromSoloSelectedList (const Region*);
|
||||||
|
|
@ -375,7 +373,6 @@ protected:
|
||||||
bool _shuffling;
|
bool _shuffling;
|
||||||
bool _nudging;
|
bool _nudging;
|
||||||
uint32_t _refcnt;
|
uint32_t _refcnt;
|
||||||
EditMode _edit_mode;
|
|
||||||
bool in_flush;
|
bool in_flush;
|
||||||
bool in_partition;
|
bool in_partition;
|
||||||
bool _frozen;
|
bool _frozen;
|
||||||
|
|
|
||||||
|
|
@ -437,7 +437,6 @@ enum MeterHold {
|
||||||
|
|
||||||
enum EditMode {
|
enum EditMode {
|
||||||
Slide,
|
Slide,
|
||||||
Splice,
|
|
||||||
Ripple,
|
Ripple,
|
||||||
RippleAll,
|
RippleAll,
|
||||||
Lock
|
Lock
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,6 @@ setup_enum_writer ()
|
||||||
REGISTER (_InputMeterLayout);
|
REGISTER (_InputMeterLayout);
|
||||||
|
|
||||||
REGISTER_ENUM (Slide);
|
REGISTER_ENUM (Slide);
|
||||||
REGISTER_ENUM (Splice);
|
|
||||||
REGISTER_ENUM (Ripple);
|
REGISTER_ENUM (Ripple);
|
||||||
REGISTER_ENUM (RippleAll);
|
REGISTER_ENUM (RippleAll);
|
||||||
REGISTER_ENUM (Lock);
|
REGISTER_ENUM (Lock);
|
||||||
|
|
|
||||||
|
|
@ -2234,7 +2234,6 @@ LuaBindings::common (lua_State* L)
|
||||||
|
|
||||||
.beginNamespace ("EditMode")
|
.beginNamespace ("EditMode")
|
||||||
.addConst ("Slide", ARDOUR::EditMode(Slide))
|
.addConst ("Slide", ARDOUR::EditMode(Slide))
|
||||||
.addConst ("Splice", ARDOUR::EditMode(Splice))
|
|
||||||
.addConst ("Ripple", ARDOUR::EditMode(Ripple))
|
.addConst ("Ripple", ARDOUR::EditMode(Ripple))
|
||||||
.addConst ("Lock", ARDOUR::EditMode(Lock))
|
.addConst ("Lock", ARDOUR::EditMode(Lock))
|
||||||
.endNamespace ()
|
.endNamespace ()
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,6 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, string namestr, boo
|
||||||
_splicing = other->_splicing;
|
_splicing = other->_splicing;
|
||||||
_rippling = other->_rippling;
|
_rippling = other->_rippling;
|
||||||
_nudging = other->_nudging;
|
_nudging = other->_nudging;
|
||||||
_edit_mode = other->_edit_mode;
|
|
||||||
|
|
||||||
in_set_state = 0;
|
in_set_state = 0;
|
||||||
first_set_state = false;
|
first_set_state = false;
|
||||||
|
|
@ -293,8 +292,9 @@ Playlist::Playlist (boost::shared_ptr<const Playlist> other, samplepos_t start,
|
||||||
|
|
||||||
thawlist.release ();
|
thawlist.release ();
|
||||||
|
|
||||||
/* 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
|
||||||
* at the end of construction, any length of cnt beyond the extents of the regions is end_space
|
* 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);
|
_end_space = cnt - (get_extent ().second - get_extent ().first);
|
||||||
|
|
||||||
|
|
@ -350,7 +350,6 @@ Playlist::init (bool hide)
|
||||||
_nudging = false;
|
_nudging = false;
|
||||||
in_set_state = 0;
|
in_set_state = 0;
|
||||||
in_undo = false;
|
in_undo = false;
|
||||||
_edit_mode = Config->get_edit_mode ();
|
|
||||||
in_flush = false;
|
in_flush = false;
|
||||||
in_partition = false;
|
in_partition = false;
|
||||||
subcnt = 0;
|
subcnt = 0;
|
||||||
|
|
@ -1208,7 +1207,7 @@ Playlist::partition_internal (samplepos_t start, samplepos_t end, bool cutting,
|
||||||
in_partition = false;
|
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;
|
samplepos_t wanted_length = end - start;
|
||||||
_end_space = wanted_length - _get_extent ().second - _get_extent ().first;
|
_end_space = wanted_length - _get_extent ().second - _get_extent ().first;
|
||||||
}
|
}
|
||||||
|
|
@ -1594,67 +1593,6 @@ Playlist::SoloSelectedActive ()
|
||||||
return !_soloSelectedRegions.empty ();
|
return !_soloSelectedRegions.empty ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Playlist::possibly_splice (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> 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<Region> 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<Region> exclude)
|
|
||||||
{
|
|
||||||
RegionWriteLock rl (this);
|
|
||||||
splice_unlocked (at, distance, exclude, rl.thawlist);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
Playlist::splice_unlocked (samplepos_t at, samplecnt_t distance, boost::shared_ptr<Region> 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
|
void
|
||||||
Playlist::ripple (samplepos_t at, samplecnt_t distance, RegionList* exclude)
|
Playlist::ripple (samplepos_t at, samplecnt_t distance, RegionList* exclude)
|
||||||
{
|
{
|
||||||
|
|
@ -2543,12 +2481,6 @@ Playlist::top_layer () const
|
||||||
return top;
|
return top;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Playlist::set_edit_mode (EditMode mode)
|
|
||||||
{
|
|
||||||
_edit_mode = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct RelayerSort {
|
struct RelayerSort {
|
||||||
bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b)
|
bool operator() (boost::shared_ptr<Region> a, boost::shared_ptr<Region> b)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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") {
|
} else if (p == "use-video-sync") {
|
||||||
|
|
||||||
waiting_for_sync_offset = config.get_use_video_sync();
|
waiting_for_sync_offset = config.get_use_video_sync();
|
||||||
|
|
|
||||||
|
|
@ -415,9 +415,7 @@ ARDOUR::compute_equal_power_fades (samplecnt_t nframes, float* in, float* out)
|
||||||
EditMode
|
EditMode
|
||||||
ARDOUR::string_to_edit_mode (string str)
|
ARDOUR::string_to_edit_mode (string str)
|
||||||
{
|
{
|
||||||
if (str == _("Splice")) {
|
if (str == _("Slide")) {
|
||||||
return Splice;
|
|
||||||
} else if (str == _("Slide")) {
|
|
||||||
return Slide;
|
return Slide;
|
||||||
} else if (str == _("Ripple")) {
|
} else if (str == _("Ripple")) {
|
||||||
return Ripple;
|
return Ripple;
|
||||||
|
|
@ -435,9 +433,6 @@ const char*
|
||||||
ARDOUR::edit_mode_to_string (EditMode mode)
|
ARDOUR::edit_mode_to_string (EditMode mode)
|
||||||
{
|
{
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case Slide:
|
|
||||||
return _("Slide");
|
|
||||||
|
|
||||||
case Lock:
|
case Lock:
|
||||||
return _("Lock");
|
return _("Lock");
|
||||||
|
|
||||||
|
|
@ -448,8 +443,8 @@ ARDOUR::edit_mode_to_string (EditMode mode)
|
||||||
return _("Ripple All");
|
return _("Ripple All");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case Splice:
|
case Slide:
|
||||||
return _("Splice");
|
return _("Slide");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue