diff --git a/libs/temporal/tempo.cc b/libs/temporal/tempo.cc index 2fa2f67a8b..54f2823120 100644 --- a/libs/temporal/tempo.cc +++ b/libs/temporal/tempo.cc @@ -2966,3 +2966,20 @@ TempoMap::init () _map_mgr.init (new_map); fetch (); } + +void +TempoMap::update (TempoMap::SharedPtr m) +{ + cerr << "SWITCHING TEMPO MAP FROM:\n"; + TempoMap::SharedPtr old (_map_mgr.reader()); + old->dump (cerr); + cerr << " TO\n"; + m->dump (cerr); + + _map_mgr.update (m); + + /* update thread local map pointer in the calling thread */ + _tempo_map_p = _map_mgr.reader(); + + MapChanged (); /* EMIT SIGNAL */ +} diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index 0cb4ffc2ab..12da8ad9f1 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -645,7 +645,7 @@ class LIBTEMPORAL_API TempoMap : public PBD::StatefulDestructible static SharedPtr write_copy() { return _map_mgr.write_copy(); } static void fetch_writable() { _tempo_map_p = write_copy(); } - static void update (SharedPtr m) { _map_mgr.update (m); _tempo_map_p = _map_mgr.reader(); } + static void update (SharedPtr m); /* and now on with the rest of the show ... */