Revert "Triggerbox: revert test-code"

This reverts commit 220b1386ab.
because it causes crashes when saving sessions.

_channel_map[] must not be empty, otherwise

Program terminated with signal SIGSEGV, Segmentation fault.
snprintf (buf, sizeof (buf), "%d", _channel_map[chn]);
#0  ARDOUR::MIDITrigger::get_state() (this=0x55d676b4c600) at ../libs/ardour/triggerbox.cc:1962
#1  0x00007f58ccb40b12 in ARDOUR::TriggerBox::get_state() (this=0x55d676b4d720) at ../libs/ardour/triggerbox.cc:33
This commit is contained in:
Robin Gareus 2022-02-05 19:17:40 +01:00
parent 77bfba1281
commit 77bca98fc0
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1705,12 +1705,10 @@ MIDITrigger::MIDITrigger (uint32_t n, TriggerBox& b)
, _start_offset (0, 0, 0)
, _legato_offset (0, 0, 0)
{
#if TRIGGER_MIDI_PROP_TESTING
Evoral::PatchChange<MidiBuffer::TimeType> pc (0, 0, 12, 0);
set_patch_change (pc);
_channel_map.assign (16, -1);
#endif
}
MIDITrigger::~MIDITrigger ()