diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index dcef7b566e..228eb07498 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -2299,6 +2299,8 @@ private: GATOMIC_QUAL gint _update_pretty_names; void setup_thread_local_variables (); + void cue_marker_change (Location*); + void sync_cues (); }; diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h index fc2e8693d6..a71b1d3c75 100644 --- a/libs/ardour/ardour/session_event.h +++ b/libs/ardour/ardour/session_event.h @@ -68,6 +68,7 @@ public: EndRoll, TransportStateChange, TriggerSceneChange, + SyncCues, /* only one of each of these events can be queued at any one time */ diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index cb5df9fede..bdbdcfedb1 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -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); +} diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index f460fd3428..723c654e46 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -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 () +{ +} +