extend TempoMapChange API to allow for replacing, not editing, the map
This commit is contained in:
parent
5d5c1ee9fc
commit
09c9ab5c75
|
@ -63,3 +63,12 @@ TempoMapChange::abort ()
|
||||||
begun = false;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ class TempoMapChange {
|
||||||
|
|
||||||
void begin ();
|
void begin ();
|
||||||
void abort ();
|
void abort ();
|
||||||
|
void use_new_map (Temporal::TempoMap::WritableSharedPtr);
|
||||||
|
|
||||||
Temporal::TempoMap& map() const { return *writable_map.get(); }
|
Temporal::TempoMap& map() const { return *writable_map.get(); }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue