From a4d9d09af5853f769e1143c2353806bfb7d89f58 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 16 Aug 2010 19:58:34 +0000 Subject: forward port 2.X changes up to and including rev 6714 git-svn-id: svn://localhost/ardour2/branches/3.0@7635 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/plugin_insert.cc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'libs/ardour/plugin_insert.cc') diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index d1f09dd0a8..73655b24b1 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -221,12 +221,16 @@ PluginInsert::parameter_changed (Evoral::Parameter which, float val) } } -void +int PluginInsert::set_block_size (nframes_t nframes) { + int ret = 0; for (Plugins::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { - (*i)->set_block_size (nframes); + if ((*i)->set_block_size (nframes) != 0) { + ret = -1; + } } + return ret; } void @@ -249,6 +253,14 @@ PluginInsert::deactivate () } } +void +PluginInsert::flush () +{ + for (vector >::iterator i = _plugins.begin(); i != _plugins.end(); ++i) { + (*i)->flush (); + } +} + void PluginInsert::connect_and_run (BufferSet& bufs, nframes_t nframes, nframes_t offset, bool with_auto, nframes_t now) { @@ -436,7 +448,7 @@ PluginInsert::automation_run (BufferSet& bufs, nframes_t nframes) return; } - if (!find_next_event (now, end, next_event)) { + if (!find_next_event (now, end, next_event) || requires_fixed_sized_buffers()) { /* no events have a time within the relevant range */ -- cgit v1.2.3