diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-12-17 01:51:12 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-12-17 01:51:12 +0000 |
commit | 428aabdcfc66ce2202b63cdf2de945e0651e50df (patch) | |
tree | 5bd89939fc31b375076c222efcb68060f2f0d211 /libs/ardour/ardour/beats_frames_converter.h | |
parent | 39ebb427b3125c9c48c37d0cf05a27267efeb6a3 (diff) |
fix BeatFramesConverter so that it at least works even if its not optimally named/designed
git-svn-id: svn://localhost/ardour2/branches/3.0@8290 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/beats_frames_converter.h')
-rw-r--r-- | libs/ardour/ardour/beats_frames_converter.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libs/ardour/ardour/beats_frames_converter.h b/libs/ardour/ardour/beats_frames_converter.h index e0856acc6f..286c4aaa6a 100644 --- a/libs/ardour/ardour/beats_frames_converter.h +++ b/libs/ardour/ardour/beats_frames_converter.h @@ -29,18 +29,19 @@ namespace ARDOUR { class TempoMap; -/** Converter between beats and frames. Takes `distances' in beats or frames +/** Converter between beats and frames. Takes durations in beats or frames * and converts them using the tempo at the \a origin supplied to the constructor. + * Note that this does not covert positions, only durations. */ class BeatsFramesConverter : public Evoral::TimeConverter<double,framepos_t> { public: - BeatsFramesConverter(const TempoMap& tempo_map, framepos_t origin) - : Evoral::TimeConverter<double, framepos_t> (origin) - , _tempo_map(tempo_map) - {} + BeatsFramesConverter (const TempoMap& tempo_map, framepos_t origin) + : Evoral::TimeConverter<double, framepos_t> (origin) + , _tempo_map(tempo_map) + {} - framepos_t to(double beats) const; - double from(framepos_t frames) const; + framepos_t to (double beats) const; + double from (framepos_t frames) const; private: const TempoMap& _tempo_map; |