Handle tempo-map changes in sync from the calling thread

This is required to collect relevent undo/redo information, notably
automation-data changes from Playlist::update_after_tempo_map_change and
DiskReader::playlist_ranges_moved.

The realtime thread should not move regions to begin with, and debug
builds woudl also assert since no undo operation was started.
This commit is contained in:
Robin Gareus 2022-10-23 23:24:12 +02:00
parent c437d6f886
commit 991ab1f8f8
2 changed files with 2 additions and 3 deletions

View File

@ -292,9 +292,6 @@ AudioEngine::process_callback (pframes_t nframes)
Temporal::TempoMap::WritableSharedPtr current_map = Temporal::TempoMap::read ();
if (current_map != Temporal::TempoMap::use()) {
Temporal::TempoMap::set (current_map);
if (_session) {
_session->tempo_map_changed ();
}
}
/* This is for JACK, where the latency callback arrives in sync with

View File

@ -502,6 +502,8 @@ Session::Session (AudioEngine &eng,
IOPluginsChanged.connect_same_thread (*this, boost::bind (&Session::resort_io_plugs, this));
TempoMap::MapChanged.connect_same_thread (*this, boost::bind (&Session::tempo_map_changed, this));
emit_thread_start ();
auto_connect_thread_start ();