mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
triggerbox: fix cue playback and recording
Somewhat alarmed that gcc (at least) allows if (cue_recording ...) to be used just like if (_cue_recording) even though the former is a class method and the latter is a class member.
This commit is contained in:
parent
0dc19a2b31
commit
15f0e4dbbf
3 changed files with 10 additions and 6 deletions
|
|
@ -1354,7 +1354,7 @@ public:
|
|||
|
||||
PBD::TimingStats dsp_stats[NTT];
|
||||
|
||||
int32_t first_cue_within (samplepos_t s, samplepos_t e);
|
||||
int32_t first_cue_within (samplepos_t s, samplepos_t e, bool& was_recorded);
|
||||
void cue_bang (int32_t);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -1628,10 +1628,12 @@ Session::sync_cues_from_list (Locations::LocationList const & locs)
|
|||
}
|
||||
|
||||
int32_t
|
||||
Session::first_cue_within (samplepos_t s, samplepos_t e)
|
||||
Session::first_cue_within (samplepos_t s, samplepos_t e, bool& was_recorded)
|
||||
{
|
||||
int32_t active_cue = _active_cue.load ();
|
||||
|
||||
was_recorded = false;
|
||||
|
||||
if (active_cue >= 0) {
|
||||
return active_cue;
|
||||
}
|
||||
|
|
@ -1645,6 +1647,7 @@ Session::first_cue_within (samplepos_t s, samplepos_t e)
|
|||
|
||||
if (si != _cue_events.end()) {
|
||||
if (si->time < e) {
|
||||
was_recorded = true;
|
||||
return si->cue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2692,10 +2692,11 @@ TriggerBox::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
|
|||
_sidechain->run (bufs, start_sample, end_sample, speed, nframes, true);
|
||||
}
|
||||
|
||||
if (!_cue_recording) {
|
||||
int32_t cue_bang = _session.first_cue_within (start_sample, end_sample);
|
||||
if (cue_bang >= 0) {
|
||||
std::cerr << " CUE BANG " << cue_bang << std::endl;
|
||||
bool was_recorded;
|
||||
int32_t cue_bang = _session.first_cue_within (start_sample, end_sample, was_recorded);
|
||||
|
||||
if (cue_bang >= 0) {
|
||||
if (!_cue_recording || !was_recorded) {
|
||||
_active_scene = cue_bang;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue