13
0

triggerbox: restore state initial implementation (incomplete)

This commit is contained in:
Paul Davis 2021-08-31 18:36:16 -06:00
parent a9d4668dee
commit af8be5e71d
2 changed files with 25 additions and 2 deletions

View File

@ -283,4 +283,10 @@ class LIBARDOUR_API TriggerBox : public Processor
} // namespace ARDOUR
namespace PBD {
DEFINE_ENUM_CONVERT(ARDOUR::Trigger::FollowAction);
DEFINE_ENUM_CONVERT(ARDOUR::Trigger::LaunchStyle);
} /* namespace PBD */
#endif /* __ardour_triggerbox_h__ */

View File

@ -106,8 +106,16 @@ Trigger::get_state (void)
}
int
Trigger::set_state (const XMLNode&, int version)
Trigger::set_state (const XMLNode& node, int version)
{
node.get_property (X_("legato"), _legato);
node.get_property (X_("launch-style"), _launch_style);
node.get_property (X_("follow-action-0"), _follow_action[0]);
node.get_property (X_("follow-action-1"), _follow_action[1]);
node.get_property (X_("quantization"), _quantization);
node.get_property (X_("name"), _name);
node.get_property (X_("index"), _index);
return 0;
}
@ -348,8 +356,17 @@ AudioTrigger::get_state (void)
}
int
AudioTrigger::set_state (const XMLNode&, int version)
AudioTrigger::set_state (const XMLNode& node, int version)
{
timepos_t t;
node.get_property (X_("start"), t);
_start_offset = t.samples();
node.get_property (X_("length"), t);
usable_length = t.samples();
last_sample = _start_offset + usable_length;
return 0;
}