summaryrefslogtreecommitdiff
path: root/libs/ardour/mtc_slave.cc
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2009-01-09 09:18:24 +0000
committerHans Baier <hansfbaier@googlemail.com>2009-01-09 09:18:24 +0000
commit799b6ec97d2dea160ae11326fda8f50ae6c34faf (patch)
tree245d54368fd59c843ace28193fee1d7dcfd22a17 /libs/ardour/mtc_slave.cc
parent3f662b9f9dd317b27b273b6d796d0e72606ff346 (diff)
* changed transport speed in session and slaves from float to double
* added some comments git-svn-id: svn://localhost/ardour2/branches/3.0@4394 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/mtc_slave.cc')
-rw-r--r--libs/ardour/mtc_slave.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/mtc_slave.cc b/libs/ardour/mtc_slave.cc
index 1a8cd589da..e45e760251 100644
--- a/libs/ardour/mtc_slave.cc
+++ b/libs/ardour/mtc_slave.cc
@@ -257,13 +257,13 @@ MTC_Slave::ok() const
}
bool
-MTC_Slave::speed_and_position (float& speed, nframes_t& pos)
+MTC_Slave::speed_and_position (double& speed, nframes_t& pos)
{
nframes_t now = session.engine().frame_time();
SafeTime last;
nframes_t frame_rate;
nframes_t elapsed;
- float speed_now;
+ double speed_now;
read_current (&last);
@@ -287,7 +287,7 @@ MTC_Slave::speed_and_position (float& speed, nframes_t& pos)
frame_rate = session.frame_rate();
- speed_now = (float) ((last.position - first_mtc_frame) / (double) (now - first_mtc_time));
+ speed_now = (double) ((last.position - first_mtc_frame) / (double) (now - first_mtc_time));
accumulator[accumulator_index++] = speed_now;
@@ -297,7 +297,7 @@ MTC_Slave::speed_and_position (float& speed, nframes_t& pos)
}
if (have_first_accumulated_speed) {
- float total = 0;
+ double total = 0;
for (int32_t i = 0; i < accumulator_size; ++i) {
total += accumulator[i];