, _pinmgr_proxy (0)
, _owner (0)
, _input_latency (0)
+ , _output_latency (0)
+ , _capture_offset (0)
+ , _playback_offset (0)
+ , _loop_location (0)
{
}
, _pinmgr_proxy (0)
, _owner (0)
, _input_latency (0)
+ , _output_latency (0)
+ , _capture_offset (0)
+ , _playback_offset (0)
+ , _loop_location (other._loop_location)
{
}
XMLNode&
Processor::get_state (void)
{
- return state (true);
+ return state ();
}
/* NODE STRUCTURE
*/
XMLNode&
-Processor::state (bool full_state)
+Processor::state ()
{
XMLNode* node = new XMLNode (state_node_name);
node->add_child_copy (*_extra_xml);
}
- if (full_state) {
+ if (!skip_saving_automation) {
XMLNode& automation = Automatable::get_automation_xml_state();
if (!automation.children().empty() || !automation.properties().empty()) {
node->add_child_nocopy (automation);
return true;
}
+bool
+Processor::map_loop_range (samplepos_t& start, samplepos_t& end) const
+{
+ if (!_loop_location) {
+ return false;
+ }
+ if (start >= end) {
+ /* no backwards looping */
+ return false;
+ }
+
+ const samplepos_t loop_end = _loop_location->end ();
+ if (start < loop_end) {
+ return false;
+ }
+
+ const samplepos_t loop_start = _loop_location->start ();
+ const samplecnt_t looplen = loop_end - loop_start;
+ const sampleoffset_t start_off = (start - loop_start) % looplen;
+ const samplepos_t start_pos = loop_start + start_off;
+
+ assert (start >= start_pos);
+ end -= start - start_pos;
+ start = start_pos;
+ assert (end > start);
+ return true;
+}
+
void
Processor::set_display_to_user (bool yn)
{
{
return _owner;
}
-
-void
-Processor::set_input_latency (samplecnt_t cnt)
-{
- _input_latency = cnt;
-}
-