diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-07-10 23:39:02 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-09-17 17:14:39 -0600 |
commit | ea30642ae3eac3706dbef1f70f8d13e8ebfec51d (patch) | |
tree | 124af6d9ed74b77e29892412fbc9eaf4cf4dc8b2 /libs/ardour/port.cc | |
parent | 455039255ba43f88a3e158b44c2c7f40605e6255 (diff) |
resize audio port _data buffer based on current buffer size
Diffstat (limited to 'libs/ardour/port.cc')
-rw-r--r-- | libs/ardour/port.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc index 4caace07c0..03210baf80 100644 --- a/libs/ardour/port.cc +++ b/libs/ardour/port.cc @@ -26,13 +26,13 @@ #include "pbd/compose.h" #include "pbd/error.h" #include "pbd/failed_constructor.h" +#include "pbd/i18n.h" #include "ardour/audioengine.h" #include "ardour/debug.h" #include "ardour/port.h" #include "ardour/port_engine.h" - -#include "pbd/i18n.h" +#include "ardour/rc_configuration.h" using namespace std; using namespace ARDOUR; @@ -645,10 +645,11 @@ 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 (16.0, std::max (0.5, s)); + _speed_ratio = std::min ((double) Config->get_max_transport_speed(), std::max (0.5, s)); } /*static*/ void -Port::set_cycle_samplecnt (pframes_t n) { +Port::set_cycle_samplecnt (pframes_t n) +{ _cycle_nframes = floor (n * _speed_ratio); } |