diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-25 17:39:53 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-03-25 17:39:53 +0000 |
commit | 3633378e1d8fd582b4fac6f166fc75e86e1172a6 (patch) | |
tree | c6838b82d5416ee79e108564f4ab5cc5f519cdfe /libs | |
parent | 463402914174800f6ccb9c59ffd652fce13607be (diff) |
make LADSPA and LV2 plugins pay attention to "offset" in connect_and_run, again (see previous commit for the reason why - the first call in an automation process cycle could have a non-zero offset)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4892 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ladspa_plugin.cc | 4 | ||||
-rw-r--r-- | libs/ardour/lv2_plugin.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index 9289899f51..6a27b8571a 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -523,14 +523,14 @@ LadspaPlugin::connect_and_run (vector<Sample*>& bufs, uint32_t nbufs, int32_t& i while (port_index < parameter_count()) { if (LADSPA_IS_PORT_AUDIO (port_descriptor(port_index))) { if (LADSPA_IS_PORT_INPUT (port_descriptor(port_index))) { - connect_port (port_index, bufs[min((uint32_t) in_index,nbufs - 1)]); + connect_port (port_index, bufs[min((uint32_t) in_index,nbufs - 1)] + offset); //cerr << this << ' ' << name() << " @ " << offset << " inport " << in_index << " = buf " // << min((uint32_t)in_index,nbufs) << " = " << &bufs[min((uint32_t)in_index,nbufs)][offset] << endl; in_index++; } else if (LADSPA_IS_PORT_OUTPUT (port_descriptor (port_index))) { - connect_port (port_index, bufs[min((uint32_t) out_index,nbufs - 1)]); + connect_port (port_index, bufs[min((uint32_t) out_index,nbufs - 1)] + offset); // cerr << this << ' ' << name() << " @ " << offset << " outport " << out_index << " = buf " // << min((uint32_t)out_index,nbufs) << " = " << &bufs[min((uint32_t)out_index,nbufs)][offset] << endl; out_index++; diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 32160abb58..10648c36d3 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -425,11 +425,11 @@ LV2Plugin::connect_and_run (vector<Sample*>& bufs, uint32_t nbufs, int32_t& in_i if (parameter_is_audio(port_index)) { if (parameter_is_input(port_index)) { slv2_instance_connect_port(_instance, port_index, - bufs[min((uint32_t)in_index, nbufs - 1)]); + bufs[min((uint32_t)in_index, nbufs - 1)] + offset); in_index++; } else if (parameter_is_output(port_index)) { slv2_instance_connect_port(_instance, port_index, - bufs[min((uint32_t)out_index, nbufs - 1)]); + bufs[min((uint32_t)out_index, nbufs - 1)] + offset); out_index++; } } |