Triggerbox: remove unused and ill-conceived API from triggers
This API was imagined as useful when Triggerbox started, but we never use them and likely never will. If some part of them is required in the future, it will likely be in a different form.
This commit is contained in:
@@ -289,7 +289,6 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
|
||||
virtual void set_start (timepos_t const &) = 0;
|
||||
virtual void set_end (timepos_t const &) = 0;
|
||||
virtual void set_length (timecnt_t const &) = 0;
|
||||
virtual void reload (BufferSet&, void*) = 0;
|
||||
virtual void io_change () {}
|
||||
virtual void set_legato_offset (timepos_t const & offset) = 0;
|
||||
|
||||
@@ -320,9 +319,6 @@ class LIBARDOUR_API Trigger : public PBD::Stateful {
|
||||
virtual bool probably_oneshot () const = 0;
|
||||
|
||||
virtual timepos_t start_offset () const = 0; /* offset from start of data */
|
||||
virtual timepos_t current_length() const = 0; /* offset from start() */
|
||||
virtual timepos_t natural_length() const = 0; /* offset from start() */
|
||||
|
||||
void process_state_requests (BufferSet& bufs, pframes_t dest_offset);
|
||||
|
||||
bool active() const { return _state >= Running; }
|
||||
@@ -552,9 +548,6 @@ class LIBARDOUR_API AudioTrigger : public Trigger {
|
||||
void set_length (timecnt_t const &);
|
||||
void set_user_data_length (samplecnt_t);
|
||||
timepos_t start_offset () const; /* offset from start of data */
|
||||
timepos_t current_length() const; /* offset from start of data */
|
||||
timepos_t natural_length() const; /* offset from start of data */
|
||||
void reload (BufferSet&, void*);
|
||||
void io_change ();
|
||||
bool probably_oneshot () const;
|
||||
|
||||
@@ -652,9 +645,6 @@ class LIBARDOUR_API MIDITrigger : public Trigger {
|
||||
void set_length (timecnt_t const &);
|
||||
timepos_t start_offset () const;
|
||||
timepos_t end() const; /* offset from start of data */
|
||||
timepos_t current_length() const; /* offset from start of data */
|
||||
timepos_t natural_length() const; /* offset from start of data */
|
||||
void reload (BufferSet&, void*);
|
||||
bool probably_oneshot () const;
|
||||
|
||||
void tempo_map_changed();
|
||||
@@ -926,7 +916,6 @@ class LIBARDOUR_API TriggerBox : public Processor, public std::enable_shared_fro
|
||||
TriggerPtr get_next_trigger ();
|
||||
TriggerPtr peek_next_trigger ();
|
||||
|
||||
void request_reload (int32_t slot, void*);
|
||||
void set_region (uint32_t slot, std::shared_ptr<Region> region);
|
||||
|
||||
void non_realtime_transport_stop (samplepos_t now, bool flush);
|
||||
@@ -1049,7 +1038,6 @@ class LIBARDOUR_API TriggerBox : public Processor, public std::enable_shared_fro
|
||||
struct Request {
|
||||
enum Type {
|
||||
Use,
|
||||
Reload,
|
||||
};
|
||||
|
||||
Type type;
|
||||
@@ -1077,8 +1065,6 @@ class LIBARDOUR_API TriggerBox : public Processor, public std::enable_shared_fro
|
||||
void process_requests (BufferSet&);
|
||||
void process_request (BufferSet&, Request*);
|
||||
|
||||
void reload (BufferSet& bufs, int32_t slot, void* ptr);
|
||||
|
||||
void cancel_locate_armed ();
|
||||
void fast_forward_nothing_to_do ();
|
||||
int handle_stopped_trigger (BufferSet& bufs, pframes_t dest_offset);
|
||||
|
||||
@@ -1717,24 +1717,6 @@ AudioTrigger::set_user_data_length (samplecnt_t s)
|
||||
_user_data_length = s;
|
||||
send_property_change (ARDOUR::Properties::length);
|
||||
}
|
||||
|
||||
timepos_t
|
||||
AudioTrigger::current_length() const
|
||||
{
|
||||
if (_region) {
|
||||
return timepos_t (data.length);
|
||||
}
|
||||
return timepos_t (Temporal::BeatTime);
|
||||
}
|
||||
|
||||
timepos_t
|
||||
AudioTrigger::natural_length() const
|
||||
{
|
||||
if (_region) {
|
||||
return timepos_t::from_superclock (_region->length().magnitude());
|
||||
}
|
||||
return timepos_t (Temporal::BeatTime);
|
||||
}
|
||||
int
|
||||
AudioTrigger::set_region_in_worker_thread_from_capture (std::shared_ptr<Region> r)
|
||||
{
|
||||
@@ -2321,8 +2303,6 @@ AudioTrigger::audio_run (BufferSet& bufs, samplepos_t start_sample, samplepos_t
|
||||
return covered_frames;
|
||||
}
|
||||
|
||||
void
|
||||
AudioTrigger::reload (BufferSet&, void*)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2952,24 +2932,6 @@ MIDITrigger::set_length (timecnt_t const & newlen)
|
||||
|
||||
}
|
||||
|
||||
timepos_t
|
||||
MIDITrigger::current_length() const
|
||||
{
|
||||
if (_region) {
|
||||
return timepos_t (data_length);
|
||||
}
|
||||
return timepos_t (Temporal::BeatTime);
|
||||
}
|
||||
|
||||
timepos_t
|
||||
MIDITrigger::natural_length() const
|
||||
{
|
||||
if (_region) {
|
||||
return timepos_t::from_ticks (_region->length().magnitude());
|
||||
}
|
||||
return timepos_t (Temporal::BeatTime);
|
||||
}
|
||||
|
||||
void
|
||||
MIDITrigger::estimate_midi_patches ()
|
||||
{
|
||||
@@ -3116,11 +3078,6 @@ MIDITrigger::retrigger ()
|
||||
DEBUG_TRACE (DEBUG::Triggers, string_compose ("%1 retriggered to start, ts = %2\n", _index, transition_beats));
|
||||
}
|
||||
|
||||
void
|
||||
MIDITrigger::reload (BufferSet&, void*)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
MIDITrigger::tempo_map_changed ()
|
||||
{
|
||||
@@ -5566,15 +5523,6 @@ TriggerBox::Request::operator delete (void *ptr, size_t /*size*/)
|
||||
return pool->release (ptr);
|
||||
}
|
||||
|
||||
void
|
||||
TriggerBox::request_reload (int32_t slot, void* ptr)
|
||||
{
|
||||
Request* r = new Request (Request::Reload);
|
||||
r->slot = slot;
|
||||
r->ptr = ptr;
|
||||
requests.write (&r, 1);
|
||||
}
|
||||
|
||||
void
|
||||
TriggerBox::process_requests (BufferSet& bufs)
|
||||
{
|
||||
@@ -5591,23 +5539,11 @@ TriggerBox::process_request (BufferSet& bufs, Request* req)
|
||||
switch (req->type) {
|
||||
case Request::Use:
|
||||
break;
|
||||
case Request::Reload:
|
||||
reload (bufs, req->slot, req->ptr);
|
||||
break;
|
||||
}
|
||||
|
||||
delete req; /* back to the pool, RT-safe */
|
||||
}
|
||||
|
||||
void
|
||||
TriggerBox::reload (BufferSet& bufs, int32_t slot, void* ptr)
|
||||
{
|
||||
if (slot >= (int32_t) all_triggers.size()) {
|
||||
return;
|
||||
}
|
||||
all_triggers[slot]->reload (bufs, ptr);
|
||||
}
|
||||
|
||||
double
|
||||
TriggerBox::position_as_fraction () const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user