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

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

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) {