triggerbox: change return type for Triggerbox::currently_playing(); add position-as-fraction to Triggerbox
This commit is contained in:
parent
9a89dd8981
commit
4918e4bcb9
@ -445,9 +445,13 @@ class LIBARDOUR_API TriggerBox : public Processor
|
||||
|
||||
void request_stop_all ();
|
||||
|
||||
/* only valid when called by Triggers from within ::process_state_requests() */
|
||||
bool currently_playing() const { return _currently_playing; }
|
||||
void set_next (uint64_t which);
|
||||
Trigger* currently_playing() const { return _currently_playing; }
|
||||
|
||||
/* Returns a negative value is there is no active Trigger, or a value between 0
|
||||
* and 1.0 if there is, corresponding to the value of position_as_fraction() for
|
||||
* the active Trigger.
|
||||
*/
|
||||
double position_as_fraction() const;
|
||||
|
||||
void queue_explict (Trigger*);
|
||||
Trigger* get_next_trigger ();
|
||||
|
@ -2401,6 +2401,16 @@ TriggerBox::reload (BufferSet& bufs, int32_t slot, void* ptr)
|
||||
all_triggers[slot]->reload (bufs, ptr);
|
||||
}
|
||||
|
||||
double
|
||||
TriggerBox::position_as_fraction () const
|
||||
{
|
||||
Trigger* cp = _currently_playing;
|
||||
if (!cp) {
|
||||
return -1;
|
||||
}
|
||||
return cp->position_as_fraction ();
|
||||
}
|
||||
|
||||
/* Thread */
|
||||
|
||||
MultiAllocSingleReleasePool* TriggerBoxThread::Request::pool = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user