summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/tempo.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-01-04 20:29:56 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-01-04 20:29:56 +0000
commitd48fd2a67954bf5eb3eb24b540f6c2790b4f8f44 (patch)
tree3074672c7e3ad429f21f78520ad919eafc2ac7c6 /libs/ardour/ardour/tempo.h
parentac19bedc3d61278c516c10be72b721e753b51246 (diff)
try to clean up locking issues with TempoMap
git-svn-id: svn://localhost/ardour2/branches/3.0@11161 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/tempo.h')
-rw-r--r--libs/ardour/ardour/tempo.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h
index f0a63be05f..09d8a64695 100644
--- a/libs/ardour/ardour/tempo.h
+++ b/libs/ardour/ardour/tempo.h
@@ -223,7 +223,7 @@ class TempoMap : public PBD::StatefulDestructible
typedef std::vector<BBTPoint> BBTPointList;
template<class T> void apply_with_metrics (T& obj, void (T::*method)(const Metrics&)) {
- Glib::RWLock::ReaderLock lm (metrics_lock);
+ Glib::RWLock::ReaderLock lm (lock);
(obj.*method)(*metrics);
}
@@ -297,11 +297,10 @@ class TempoMap : public PBD::StatefulDestructible
framepos_t last_bbt_when;
bool last_bbt_valid;
Timecode::BBT_Time last_bbt;
- mutable Glib::RWLock metrics_lock;
- mutable Glib::RWLock map_lock;
+ mutable Glib::RWLock lock;
BBTPointList* _map;
- void recompute_map (bool reassign_tempo_bbt, framepos_t end = -1);
+ void recompute_map (bool reassign_tempo_bbt, bool use_write_lock, framepos_t end = -1);
void require_map_to (framepos_t pos);
void require_map_to (const Timecode::BBT_Time&);
@@ -309,11 +308,9 @@ class TempoMap : public PBD::StatefulDestructible
BBTPointList::const_iterator bbt_after_or_at (framepos_t);
BBTPointList::const_iterator bbt_point_for (const Timecode::BBT_Time&);
- void timestamp_metrics_from_audio_time ();
-
framepos_t round_to_type (framepos_t fr, int dir, BBTPointType);
- void bbt_time_unlocked (framepos_t, Timecode::BBT_Time&, const BBTPointList::const_iterator&);
+ void bbt_time (framepos_t, Timecode::BBT_Time&, const BBTPointList::const_iterator&);
framecnt_t bbt_duration_at_unlocked (const Timecode::BBT_Time& when, const Timecode::BBT_Time& bbt, int dir);