cue events: some basic handling framework for syncing cue markers with session events that implement them

This doesn't actually do anything yet
This commit is contained in:
Paul Davis 2022-01-04 18:03:28 -07:00
parent 5783664b9e
commit 93b30976e5
4 changed files with 22 additions and 0 deletions

View File

@ -2299,6 +2299,8 @@ private:
GATOMIC_QUAL gint _update_pretty_names;
void setup_thread_local_variables ();
void cue_marker_change (Location*);
void sync_cues ();
};

View File

@ -68,6 +68,7 @@ public:
EndRoll,
TransportStateChange,
TriggerSceneChange,
SyncCues,
/* only one of each of these events can be queued at any one time */

View File

@ -483,6 +483,8 @@ Session::Session (AudioEngine &eng,
Controllable::ControlTouched.connect_same_thread (*this, boost::bind (&Session::controllable_touched, this, _1));
Location::cue_change.connect_same_thread (*this, boost::bind (&Session::cue_marker_change, this, _1));
emit_thread_start ();
auto_connect_thread_start ();
@ -7366,3 +7368,10 @@ Session::had_destructive_tracks() const
{
return _had_destructive_tracks;
}
void
Session::cue_marker_change (Location* loc)
{
SessionEvent* ev = new SessionEvent (SessionEvent::SyncCues, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0);
queue_event (ev);
}

View File

@ -1047,6 +1047,10 @@ Session::process_event (SessionEvent* ev)
g_atomic_int_set (&_suspend_timecode_transmission, ev->yes_or_no ? 0 : 1);
break;
case SessionEvent::SyncCues:
sync_cues ();
break;
default:
fatal << string_compose(_("Programming error: illegal event type in process_event (%1)"), ev->type) << endmsg;
abort(); /*NOTREACHED*/
@ -1580,3 +1584,9 @@ Session::implement_master_strategy ()
return true;
}
void
Session::sync_cues ()
{
}