mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 23:35:03 +01:00
temporal: add sanity check to TempoMap::fetch()
Threads should never call ::fetch() if they have a local tempo map in use.
This commit is contained in:
parent
478dd72fb0
commit
023290b99d
1 changed files with 2 additions and 3 deletions
|
|
@ -744,7 +744,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
|
|||
|
||||
LIBTEMPORAL_API static void update_thread_tempo_map() { _tempo_map_p = _map_mgr.reader(); }
|
||||
LIBTEMPORAL_API static SharedPtr use() { assert (_tempo_map_p); return _tempo_map_p; }
|
||||
LIBTEMPORAL_API static SharedPtr fetch() { update_thread_tempo_map(); return _tempo_map_p; }
|
||||
LIBTEMPORAL_API static SharedPtr fetch() { assert (!_tempo_map_p || !_tempo_map_p->scope_owner()); update_thread_tempo_map(); return _tempo_map_p; }
|
||||
|
||||
/* Used only by the ARDOUR::AudioEngine API to reset the process thread
|
||||
* tempo map only when it has changed.
|
||||
|
|
@ -1012,7 +1012,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
|
|||
|
||||
void set_scope_owner (ScopedTempoMapOwner&);
|
||||
ScopedTempoMapOwner* scope_owner() const { return _scope_owner; }
|
||||
|
||||
|
||||
private:
|
||||
Tempos _tempos;
|
||||
Meters _meters;
|
||||
|
|
@ -1315,4 +1315,3 @@ LIBTEMPORAL_API std::ostream& operator<<(std::ostream& str, Temporal::MeterPoint
|
|||
LIBTEMPORAL_API std::ostream& operator<<(std::ostream& str, Temporal::MusicTimePoint const &);
|
||||
LIBTEMPORAL_API std::ostream& operator<<(std::ostream& str, Temporal::TempoMetric const &);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue