13
0

new session event type for triggering scene changes

This commit is contained in:
Paul Davis 2021-11-03 22:58:17 -06:00
parent 0c5d41039a
commit 241948635b
3 changed files with 22 additions and 14 deletions

View File

@ -67,6 +67,7 @@ public:
StartRoll, StartRoll,
EndRoll, EndRoll,
TransportStateChange, TransportStateChange,
TriggerSceneChange,
/* only one of each of these events can be queued at any one time */ /* only one of each of these events can be queued at any one time */
@ -90,6 +91,7 @@ public:
bool yes_or_no; bool yes_or_no;
samplepos_t target2_sample; samplepos_t target2_sample;
OverwriteReason overwrite; OverwriteReason overwrite;
int32_t scene;
}; };
boost::weak_ptr<Track> track; boost::weak_ptr<Track> track;

View File

@ -792,12 +792,14 @@ Session::destroy ()
case SessionEvent::PunchOut: case SessionEvent::PunchOut:
case SessionEvent::RangeStop: case SessionEvent::RangeStop:
case SessionEvent::RangeLocate: case SessionEvent::RangeLocate:
case SessionEvent::TriggerSceneChange:
remove = false; remove = false;
del = false; del = false;
break; break;
case SessionEvent::RealTimeOperation: case SessionEvent::RealTimeOperation:
process_rtop (ev); process_rtop (ev);
del = false; del = false;
break;
default: default:
break; break;
} }

View File

@ -965,6 +965,10 @@ Session::process_event (SessionEvent* ev)
} }
break; break;
case SessionEvent::TriggerSceneChange:
TriggerBox::scene_bang (ev->scene);
break;
case SessionEvent::PunchIn: case SessionEvent::PunchIn:
// cerr << "PunchIN at " << transport_sample() << endl; // cerr << "PunchIN at " << transport_sample() << endl;
if (config.get_punch_in() && record_status() == Enabled) { if (config.get_punch_in() && record_status() == Enabled) {