diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-11-15 15:14:09 -0700 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-11-15 16:06:04 -0700 |
commit | 302fe227b8ef96e9825a3c8f09c3851ff5e67978 (patch) | |
tree | 441fb0c4b1ea5bd32d5ca8a0554945b8e9241941 /libs/ardour/port.cc | |
parent | ec2ba359975b0c3c3ea317584d1577f21fa621c6 (diff) |
fix resampling ratio when stopped (corner case - not typically called)
Diffstat (limited to 'libs/ardour/port.cc')
-rw-r--r-- | libs/ardour/port.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc index 7a8abcf092..a8e80ad98c 100644 --- a/libs/ardour/port.cc +++ b/libs/ardour/port.cc @@ -645,7 +645,12 @@ Port::set_state (const XMLNode& node, int) /*static*/ void Port::set_speed_ratio (double s) { /* see VMResampler::set_rratio() for min/max range */ - _speed_ratio = std::min ((double) Config->get_max_transport_speed(), std::max (0.02, fabs (s))); + if (s == 0.0) { + /* no resampling when stopped */ + _speed_ratio = 1.0; + } else { + _speed_ratio = std::min ((double) Config->get_max_transport_speed(), std::max (0.02, fabs (s))); + } } /*static*/ void |