diff --git a/gtk2_ardour/tempo_map_change.cc b/gtk2_ardour/tempo_map_change.cc index 6607d39229..0cc553e10a 100644 --- a/gtk2_ardour/tempo_map_change.cc +++ b/gtk2_ardour/tempo_map_change.cc @@ -63,3 +63,12 @@ TempoMapChange::abort () begun = false; } } + +void +TempoMapChange::use_new_map (Temporal::TempoMap::WritableSharedPtr new_map) +{ + /* existing write copy goes out of scope, and is deleted, We continue + * on with the new map, and will RCU-update it in our destructor. + */ + writable_map = new_map; +} diff --git a/gtk2_ardour/tempo_map_change.h b/gtk2_ardour/tempo_map_change.h index 072bacb8e1..de3fea0aa4 100644 --- a/gtk2_ardour/tempo_map_change.h +++ b/gtk2_ardour/tempo_map_change.h @@ -41,6 +41,7 @@ class TempoMapChange { void begin (); void abort (); + void use_new_map (Temporal::TempoMap::WritableSharedPtr); Temporal::TempoMap& map() const { return *writable_map.get(); }