summaryrefslogtreecommitdiff
path: root/libs/ardour/beats_frames_converter.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-08-05 13:36:38 +0000
committerCarl Hetherington <carl@carlh.net>2010-08-05 13:36:38 +0000
commit5e3ca4db5cc356385e520643cfd279f393db4b51 (patch)
tree2ea31a74d34e37e33bc5b126a5e7f1b58753b4f0 /libs/ardour/beats_frames_converter.cc
parente7a2b99f3d4f7afe73a30ac85e770e228785c1be (diff)
Support cut / copy / paste of MIDI automation.
git-svn-id: svn://localhost/ardour2/branches/3.0@7545 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/beats_frames_converter.cc')
-rw-r--r--libs/ardour/beats_frames_converter.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/beats_frames_converter.cc b/libs/ardour/beats_frames_converter.cc
index f93e5e7224..9d3b8ae4c6 100644
--- a/libs/ardour/beats_frames_converter.cc
+++ b/libs/ardour/beats_frames_converter.cc
@@ -28,10 +28,10 @@ sframes_t
BeatsFramesConverter::to(double beats) const
{
// FIXME: assumes tempo never changes after origin
- const Tempo& tempo = _tempo_map.tempo_at(_origin);
+ const Tempo& tempo = _tempo_map.tempo_at (_origin_b);
const double frames_per_beat = tempo.frames_per_beat(
_tempo_map.frame_rate(),
- _tempo_map.meter_at(_origin));
+ _tempo_map.meter_at (_origin_b));
return lrint(beats * frames_per_beat);
}
@@ -40,10 +40,10 @@ double
BeatsFramesConverter::from(sframes_t frames) const
{
// FIXME: assumes tempo never changes after origin
- const Tempo& tempo = _tempo_map.tempo_at(_origin);
+ const Tempo& tempo = _tempo_map.tempo_at (_origin_b);
const double frames_per_beat = tempo.frames_per_beat(
_tempo_map.frame_rate(),
- _tempo_map.meter_at(_origin));
+ _tempo_map.meter_at (_origin_b));
return frames / frames_per_beat;
}