summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-04-01 11:22:35 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-04-01 11:22:35 -0400
commit9a4827374ca4e4c310d02adf65c727d92b56724c (patch)
tree02d79ea162b398cb33523f776088bd68ae7cfef9 /libs/ardour/ardour
parent73f967c330fcd2a81f4fa3db3d08a77a7c1b003b (diff)
remove race condition when editing tempo/meter information.
Lock was not held across a replace_{tempo,meter}() operation because of re-use of {remove,add}_{tempo,meter}. Moved functional code into _locked variants so that replace operation can hold lock across its entire active lifetime.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/tempo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index f2d314651d..6e6818bf19 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -364,6 +364,13 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
TempoSection& first_tempo();
void do_insert (MetricSection* section);
+
+ void add_tempo_locked (const Tempo&, Timecode::BBT_Time where, bool recompute);
+ void add_meter_locked (const Meter&, Timecode::BBT_Time where, bool recompute);
+
+ bool remove_tempo_locked (const TempoSection&);
+ bool remove_meter_locked (const MeterSection&);
+
};
}; /* namespace ARDOUR */