diff options
author | Robin Gareus <robin@gareus.org> | 2015-08-09 06:55:55 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-08-09 08:37:22 +0200 |
commit | 780067332923bee59bc2040205ce905e2894f793 (patch) | |
tree | 5e78703451089021a85a718d10389a515e2e62ea | |
parent | f6ecfc063d81d1fa37cbef124afec7a92579f8d7 (diff) |
remember actual processor configuration
Prepare for proper processor-box wire-display:
Don't replicate connection-logic in the GUI, allow to query the
actual configured configuration (which may differ from the processor
i/o-streams)
-rw-r--r-- | libs/ardour/ardour/plugin_insert.h | 5 | ||||
-rw-r--r-- | libs/ardour/plugin_insert.cc | 22 |
2 files changed, 19 insertions, 8 deletions
diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 7504478e87..f9578a188d 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -142,6 +142,8 @@ class LIBARDOUR_API PluginInsert : public Processor return _match.method == Split; } + void configured_io (ChanCount &in, ChanCount &out) { in = _configured_in; out = _configured_out; } + PBD::Signal2<void,BufferSet*, BufferSet*> AnalysisDataGathered; PBD::Signal0<void> PluginIoReConfigure; @@ -182,6 +184,9 @@ class LIBARDOUR_API PluginInsert : public Processor ChanCount midi_bypass; + ChanCount _configured_in; + ChanCount _configured_out; + /** Description of how we can match our plugin's IO to our own insert IO */ struct Match { Match () : method (Impossible), plugins (0) {} diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index bd61a9bf2d..910b2cd6dc 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -715,18 +715,14 @@ PluginInsert::configure_io (ChanCount in, ChanCount out) ChanCount old_in = input_streams (); ChanCount old_out = output_streams (); + _configured_in = in; + _configured_out = out; + /* set the matching method and number of plugins that we will use to meet this configuration */ _match = private_can_support_io_configuration (in, out); if (set_count (_match.plugins) == false) { - return false; - } - - if ( (old_match.method != _match.method && (old_match.method == Split || _match.method == Split)) - || old_in != in - || old_out != out - ) - { PluginIoReConfigure (); /* EMIT SIGNAL */ + return false; } /* configure plugins */ @@ -734,17 +730,27 @@ PluginInsert::configure_io (ChanCount in, ChanCount out) case Split: case Hide: if (_plugins.front()->configure_io (_plugins.front()->get_info()->n_inputs, out)) { + PluginIoReConfigure (); /* EMIT SIGNAL */ return false; } break; default: if (_plugins.front()->configure_io (in, out) == false) { + PluginIoReConfigure (); /* EMIT SIGNAL */ return false; } break; } + if ( (old_match.method != _match.method && (old_match.method == Split || _match.method == Split)) + || old_in != in + || old_out != out + ) + { + PluginIoReConfigure (); /* EMIT SIGNAL */ + } + // we don't know the analysis window size, so we must work with the // current buffer size here. each request for data fills in these // buffers and the analyser makes sure it gets enough data for the |