tentative steps in infrastructure for displaying clip data during capture
This commit is contained in:
parent
6193535a31
commit
62a4df52c7
@ -966,6 +966,8 @@ class LIBARDOUR_API TriggerBox : public Processor, public std::enable_shared_fro
|
||||
void maybe_capture (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, double speed, pframes_t nframes);
|
||||
void finish_recording (BufferSet& bufs);
|
||||
void set_armed (SlotArmInfo*);
|
||||
SlotArmInfo* capture_info() const { return _arm_info; }
|
||||
PBD::Signal0<void> Captured;
|
||||
|
||||
/* These four are accessed (read/write) only from process() context */
|
||||
|
||||
|
@ -3633,7 +3633,7 @@ TriggerBox::maybe_capture (BufferSet& bufs, samplepos_t start_sample, samplepos_
|
||||
|
||||
/* Audio */
|
||||
|
||||
const size_t n_buffers = bufs.count().n_audio();
|
||||
size_t n_buffers = bufs.count().n_audio();
|
||||
|
||||
if (n_buffers) {
|
||||
|
||||
@ -3646,6 +3646,11 @@ TriggerBox::maybe_capture (BufferSet& bufs, samplepos_t start_sample, samplepos_
|
||||
}
|
||||
}
|
||||
|
||||
n_buffers = bufs.count().n_midi();
|
||||
bool send_signal = false;
|
||||
|
||||
if (n_buffers) {
|
||||
|
||||
/* MIDI */
|
||||
|
||||
MidiBuffer& buf = bufs.get_midi (0);
|
||||
@ -3676,9 +3681,15 @@ TriggerBox::maybe_capture (BufferSet& bufs, samplepos_t start_sample, samplepos_
|
||||
const samplepos_t event_time (start_sample + ev.time() - ai->start.samples());
|
||||
if (!ai->end || (event_time < ai->end.samples())) {
|
||||
ai->midi_buf->write (tmap->quarters_at_sample (event_time), ev.event_type(), ev.size(), ev.buffer());
|
||||
send_signal = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (send_signal) {
|
||||
Captured(); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
if (reached_end) {
|
||||
finish_recording (bufs);
|
||||
|
Loading…
Reference in New Issue
Block a user