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

View File

@ -786,20 +786,22 @@ Session::destroy ()
bool remove = true;
bool del = true;
switch (ev->type) {
case SessionEvent::AutoLoop:
case SessionEvent::Skip:
case SessionEvent::PunchIn:
case SessionEvent::PunchOut:
case SessionEvent::RangeStop:
case SessionEvent::RangeLocate:
remove = false;
del = false;
break;
case SessionEvent::RealTimeOperation:
process_rtop (ev);
del = false;
default:
break;
case SessionEvent::AutoLoop:
case SessionEvent::Skip:
case SessionEvent::PunchIn:
case SessionEvent::PunchOut:
case SessionEvent::RangeStop:
case SessionEvent::RangeLocate:
case SessionEvent::TriggerSceneChange:
remove = false;
del = false;
break;
case SessionEvent::RealTimeOperation:
process_rtop (ev);
del = false;
break;
default:
break;
}
if (remove) {
del = del && !_remove_event (ev);

View File

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