when recording MIDI, create active_notes on demand
Since the signal handler for "data recorded" is in the GUI thread, we can do whatever we want there, including memory allocation
This commit is contained in:
parent
a7bd0da8ea
commit
96ef4d20f2
@ -501,9 +501,7 @@ MidiCueEditor::box_rec_enable_change (ARDOUR::TriggerBox const & b)
|
||||
void
|
||||
MidiCueEditor::trigger_rec_enable_change (ARDOUR::Trigger const & t)
|
||||
{
|
||||
if (t.armed()) {
|
||||
view->begin_write();
|
||||
} else {
|
||||
if (!t.armed()) {
|
||||
view->end_write ();
|
||||
}
|
||||
}
|
||||
|
@ -193,12 +193,6 @@ MidiView::set_track (std::shared_ptr<MidiTrack> mt)
|
||||
|
||||
if (_midi_track) {
|
||||
_midi_track->DropReferences.connect (track_going_away_connection, invalidator (*this), std::bind (&MidiView::track_going_away, this), gui_context());
|
||||
|
||||
if (_needs_active_notes_for_rec_enabled_track && _midi_track->triggerbox()->record_enabled()) {
|
||||
begin_write ();
|
||||
} else {
|
||||
end_write ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4497,8 +4491,7 @@ MidiView::clip_data_recorded (samplecnt_t total_duration)
|
||||
}
|
||||
|
||||
if (!_active_notes) {
|
||||
/* we aren't actively being recorded to */
|
||||
return;
|
||||
begin_write ();
|
||||
}
|
||||
|
||||
if (_active_notes) {
|
||||
|
Loading…
Reference in New Issue
Block a user