diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-04-18 12:28:44 +0100 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-09-18 11:40:53 -0400 |
commit | e24ca13394da73f2cf5f3ffa99b0fc0c8dacaff9 (patch) | |
tree | b2a908e409460acc3076d5c999a6bc56c05cf7c3 /libs/ardour/disk_io.cc | |
parent | f9e7ffc601fdec2470f106a963da80d60e6290e6 (diff) |
remove all remaining vestiges of per-track varispeed from libardour
Diffstat (limited to 'libs/ardour/disk_io.cc')
-rw-r--r-- | libs/ardour/disk_io.cc | 40 |
1 files changed, 9 insertions, 31 deletions
diff --git a/libs/ardour/disk_io.cc b/libs/ardour/disk_io.cc index 5b81e2a161..587ba19ed0 100644 --- a/libs/ardour/disk_io.cc +++ b/libs/ardour/disk_io.cc @@ -49,8 +49,6 @@ DiskIOProcessor::DiskIOProcessor (Session& s, string const & str, Flag f) : Processor (s, str) , _flags (f) , i_am_the_modifier (false) - , _actual_speed (0.0) - , _target_speed (0.0) , _buffer_reallocation_required (false) , _seek_required (false) , _slaved (false) @@ -204,7 +202,7 @@ DiskIOProcessor::non_realtime_locate (framepos_t location) } void -DiskIOProcessor::non_realtime_set_speed () +DiskIOProcessor::non_realtime_speed_change () { if (_buffer_reallocation_required) { _buffer_reallocation_required = false; @@ -217,31 +215,18 @@ DiskIOProcessor::non_realtime_set_speed () } bool -DiskIOProcessor::realtime_set_speed (double new_speed, bool global) +DiskIOProcessor::realtime_speed_change () { - bool changed = false; + const framecnt_t required_wrap_size = (framecnt_t) ceil (_session.get_block_size() * fabs (_session.transport_speed())) + 2; + bool _buffer_reallocation_required; - DEBUG_TRACE (DEBUG::Transport, string_compose ("%1 will run at %2\n", name(), new_speed)); - - if (_target_speed != new_speed) { - _target_speed = new_speed; - changed = true; - - framecnt_t required_wrap_size = (framecnt_t) ceil (_session.get_block_size() * fabs (new_speed)) + 2; - - if (required_wrap_size > wrap_buffer_size) { - _buffer_reallocation_required = true; - } - } - - if (changed) { - if (!global) { - _seek_required = true; - } - SpeedChanged (); /* EMIT SIGNAL */ + if (required_wrap_size > wrap_buffer_size) { + _buffer_reallocation_required = true; + } else { + _buffer_reallocation_required = false; } - return _buffer_reallocation_required || _seek_required; + return _buffer_reallocation_required; } int @@ -255,13 +240,6 @@ DiskIOProcessor::set_state (const XMLNode& node, int version) _flags = Flag (string_2_enum (prop->value(), _flags)); } - if ((prop = node.property ("speed")) != 0) { - double sp = atof (prop->value().c_str()); - - if (realtime_set_speed (sp, false)) { - non_realtime_set_speed (); - } - } return 0; } |