13
0

triggerbox: store cue bangs in process thread when discovered

This commit is contained in:
Paul Davis 2022-01-21 10:11:32 -07:00
parent 9abf6bc260
commit 8d1684e1f7
2 changed files with 10 additions and 1 deletions

View File

@ -524,7 +524,10 @@ class LIBARDOUR_API TriggerBoxThread
struct CueRecord { struct CueRecord {
int32_t cue_number; int32_t cue_number;
timepos_t when; samplepos_t when;
CueRecord (int32_t cn, samplepos_t t): cue_number (cn), when (t) {}
CueRecord () : cue_number (0), when (0) {}
}; };
typedef PBD::RingBuffer<CueRecord> CueRecords; typedef PBD::RingBuffer<CueRecord> CueRecords;

View File

@ -1671,6 +1671,12 @@ Session::maybe_find_pending_cue ()
int32_t ac = _pending_cue.exchange (-1); int32_t ac = _pending_cue.exchange (-1);
if (ac >= 0) { if (ac >= 0) {
_active_cue.store (ac); _active_cue.store (ac);
if (TriggerBox::cue_recording()) {
CueRecord cr (ac, _transport_sample);
TriggerBox::cue_records.write (&cr, 1);
/* failure is acceptable, but unlikely */
}
} }
} }