mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-26 06:58:22 +01:00
followup to previous commit, enabling AudioTriggers to be cleared and then recorded
This commit is contained in:
parent
7088022401
commit
c9e4c405e1
2 changed files with 4 additions and 12 deletions
|
|
@ -572,6 +572,7 @@ class LIBARDOUR_API AudioTrigger : public Trigger {
|
|||
|
||||
samplecnt_t append (Sample const * src, samplecnt_t cnt, uint32_t chan);
|
||||
void alloc (samplecnt_t cnt, uint32_t nchans);
|
||||
void reset () { length = 0; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -728,16 +728,6 @@ Trigger::set_region (std::shared_ptr<Region> r, bool use_thread)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Trigger::clear_region ()
|
||||
{
|
||||
/* Called from RT process thread */
|
||||
|
||||
_region.reset ();
|
||||
DEBUG_TRACE (DEBUG::Triggers, string_compose ("cleared region for %1\n", _index));
|
||||
set_name ("");
|
||||
}
|
||||
|
||||
void
|
||||
Trigger::set_region_internal (std::shared_ptr<Region> r)
|
||||
{
|
||||
|
|
@ -1728,7 +1718,8 @@ AudioTrigger::set_region_in_worker_thread_internal (std::shared_ptr<Region> r, b
|
|||
set_region_internal (r);
|
||||
|
||||
if (!r) {
|
||||
/* unset */
|
||||
data.reset ();
|
||||
std::cerr << "T " << _box.order() << " / " << index() << " cleared, now playable ? " << playable() << " dl " << data.length() << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -4297,7 +4288,7 @@ TriggerBox::maybe_swap_pending (uint32_t slot)
|
|||
empty_changed = true;
|
||||
}
|
||||
}
|
||||
all_triggers[slot]->clear_region ();
|
||||
all_triggers[slot]->set_region (nullptr);
|
||||
} else {
|
||||
if (!all_triggers[slot]->playable()) {
|
||||
if (_active_slots == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue