mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 19:16:40 +01:00
temporal: fix up some logic relating to scoped tempo maps
This commit is contained in:
parent
023290b99d
commit
dd41fddcad
3 changed files with 15 additions and 4 deletions
|
|
@ -35,16 +35,20 @@ class ScopedTempoMapOwner
|
|||
virtual ~ScopedTempoMapOwner () {}
|
||||
|
||||
void start_local_tempo_map (std::shared_ptr<Temporal::TempoMap> map) {
|
||||
_local_tempo_map = map;
|
||||
in ();
|
||||
DEBUG_TRACE (PBD::DEBUG::ScopedTempoMap, string_compose ("%1: starting local tempo scope\n", scope_name()));
|
||||
map->set_scope_owner (*this);
|
||||
_local_tempo_map = map;
|
||||
Temporal::TempoMap::set (_local_tempo_map);
|
||||
local_tempo_map_depth = 1;
|
||||
}
|
||||
|
||||
void end_local_tempo_map () {
|
||||
DEBUG_TRACE (PBD::DEBUG::ScopedTempoMap, string_compose ("%1: ending local tempo scope\n", scope_name()));
|
||||
local_tempo_map_depth = 1; /* force exit in out() */
|
||||
out ();
|
||||
assert (_local_tempo_map);
|
||||
local_tempo_map_depth = 0;
|
||||
_local_tempo_map->clear_scope_owner ();
|
||||
_local_tempo_map.reset ();
|
||||
Temporal::TempoMap::fetch ();
|
||||
}
|
||||
|
||||
uint64_t depth() const { return local_tempo_map_depth; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue