Rename plugin pin I/O API (NO-OP)
This allows to distinguish Processor::configure_io from the Plugin API with the same name. Despite the identical name, both functions serve different purposes. Likewise the ::can_support_io_configuration() API is renamed. The signature of that function call has already diverged. The Plugin-API has to handle optional busses (e.g. side-chain) and replication. The PluginInsert processor provides context. This change is in preparation for AudioUnit and VST3 busses. Currently a stereo-input (1 bus) cannot be distinguished from mono + sidechain (2 busses).
This commit is contained in:
parent
64391334a4
commit
10b05df189
@ -106,10 +106,11 @@ class LIBARDOUR_API AUPlugin : public ARDOUR::Plugin
|
||||
|
||||
bool has_editor () const;
|
||||
|
||||
bool can_support_io_configuration (const ChanCount& in, ChanCount& out, ChanCount* imprecise);
|
||||
bool match_variable_io (const ChanCount& in, ChanCount& out, ChanCount* imprecise);
|
||||
bool reconfigure_io (ChanCount in, ChanCount out);
|
||||
|
||||
ChanCount output_streams() const;
|
||||
ChanCount input_streams() const;
|
||||
bool configure_io (ChanCount in, ChanCount out);
|
||||
bool requires_fixed_size_buffers() const;
|
||||
|
||||
void set_fixed_size_buffers (bool yn) {
|
||||
|
@ -117,8 +117,8 @@ public:
|
||||
|
||||
bool has_editor() const { return false; }
|
||||
|
||||
bool can_support_io_configuration (const ChanCount& in, ChanCount& out, ChanCount* imprecise);
|
||||
bool configure_io (ChanCount in, ChanCount out);
|
||||
bool match_variable_io (const ChanCount& in, ChanCount& out, ChanCount* imprecise);
|
||||
bool reconfigure_io (ChanCount in, ChanCount out);
|
||||
|
||||
ChanCount output_streams() const { return _configured_out; }
|
||||
ChanCount input_streams() const { return _configured_in; }
|
||||
|
@ -294,8 +294,8 @@ public:
|
||||
*/
|
||||
PBD::Signal2<void, uint32_t, float> ParameterChangedExternally;
|
||||
|
||||
virtual bool configure_io (ChanCount /*in*/, ChanCount /*out*/) { return true; }
|
||||
virtual bool can_support_io_configuration (const ChanCount& /*in*/, ChanCount& /*out*/, ChanCount* imprecise = 0) { return false; }
|
||||
virtual bool reconfigure_io (ChanCount /*in*/, ChanCount /*out*/) { return false; }
|
||||
virtual bool match_variable_io (const ChanCount& /*in*/, ChanCount& /*out*/, ChanCount* imprecise = 0) { return false; }
|
||||
|
||||
virtual ChanCount output_streams () const;
|
||||
virtual ChanCount input_streams () const;
|
||||
|
@ -1088,7 +1088,7 @@ AUPlugin::set_block_size (pframes_t nframes)
|
||||
}
|
||||
|
||||
bool
|
||||
AUPlugin::configure_io (ChanCount in, ChanCount out)
|
||||
AUPlugin::reconfigure_io (ChanCount in, ChanCount out)
|
||||
{
|
||||
AudioStreamBasicDescription streamFormat;
|
||||
bool was_initialized = initialized;
|
||||
@ -1267,7 +1267,7 @@ AUPlugin::output_streams() const
|
||||
}
|
||||
|
||||
bool
|
||||
AUPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& out, ChanCount* imprecise)
|
||||
AUPlugin::match_variable_io (const ChanCount& in, ChanCount& out, ChanCount* imprecise)
|
||||
{
|
||||
_output_configs.clear ();
|
||||
const int32_t audio_in = in.n_audio();
|
||||
@ -2944,7 +2944,7 @@ AUPluginInfo::discover_by_description (PluginInfoList& plugs, CAComponentDescrip
|
||||
|
||||
for now, if the plugin provides a wildcard, treat it as 1. we really
|
||||
don't care much, because whether we can handle an i/o configuration
|
||||
depends upon ::can_support_io_configuration(), not these counts.
|
||||
depends upon ::configure_variable_io(), not these counts.
|
||||
|
||||
they exist because other parts of ardour try to present i/o configuration
|
||||
info to the user, which should perhaps be revisited.
|
||||
|
@ -394,7 +394,7 @@ LuaProc::load_script ()
|
||||
}
|
||||
|
||||
bool
|
||||
LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, ChanCount* imprecise)
|
||||
LuaProc::match_variable_io (const ChanCount& in, ChanCount& out, ChanCount* imprecise)
|
||||
{
|
||||
// caller must hold process lock (no concurrent calls to interpreter
|
||||
_output_configs.clear ();
|
||||
@ -591,7 +591,7 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
|
||||
}
|
||||
|
||||
bool
|
||||
LuaProc::configure_io (ChanCount in, ChanCount out)
|
||||
LuaProc::reconfigure_io (ChanCount in, ChanCount out)
|
||||
{
|
||||
in.set (DataType::MIDI, _has_midi_input ? 1 : 0);
|
||||
out.set (DataType::MIDI, _has_midi_output ? 1 : 0);
|
||||
@ -1270,7 +1270,7 @@ LuaPluginInfo::LuaPluginInfo (LuaScriptInfoPtr lsi) {
|
||||
n_outputs.set (DataType::AUDIO, 1);
|
||||
type = Lua;
|
||||
|
||||
// TODO, parse script, get 'dsp_ioconfig', see can_support_io_configuration()
|
||||
// TODO, parse script, get 'dsp_ioconfig', see match_variable_io()
|
||||
_max_outputs = 0;
|
||||
}
|
||||
|
||||
|
@ -442,7 +442,7 @@ PluginInsert::has_output_presets (ChanCount in, ChanCount out)
|
||||
{
|
||||
if (!_configured && _plugins[0]->get_info ()->reconfigurable_io ()) {
|
||||
// collect possible configurations, prefer given in/out
|
||||
_plugins[0]->can_support_io_configuration (in, out);
|
||||
_plugins[0]->match_variable_io (in, out);
|
||||
}
|
||||
|
||||
PluginOutputConfiguration ppc (_plugins[0]->possible_output ());
|
||||
@ -1953,7 +1953,7 @@ PluginInsert::configure_io (ChanCount in, ChanCount out)
|
||||
switch (_match.method) {
|
||||
case Split:
|
||||
case Hide:
|
||||
if (_plugins.front()->configure_io (natural_input_streams(), out) == false) {
|
||||
if (_plugins.front()->reconfigure_io (natural_input_streams(), out) == false) {
|
||||
PluginIoReConfigure (); /* EMIT SIGNAL */
|
||||
_configured = false;
|
||||
return false;
|
||||
@ -1976,14 +1976,14 @@ PluginInsert::configure_io (ChanCount in, ChanCount out)
|
||||
if (out.n_audio () == 0) { out.set (DataType::AUDIO, 1); }
|
||||
ChanCount useins;
|
||||
DEBUG_TRACE (DEBUG::ChanMapping, string_compose ("%1: Delegate lookup : %2 %3\n", name(), din, dout));
|
||||
bool const r = _plugins.front()->can_support_io_configuration (din, dout, &useins);
|
||||
bool const r = _plugins.front()->match_variable_io (din, dout, &useins);
|
||||
assert (r);
|
||||
if (useins.n_audio() == 0) {
|
||||
useins = din;
|
||||
}
|
||||
DEBUG_TRACE (DEBUG::ChanMapping, string_compose ("%1: Delegate configuration: %2 %3\n", name(), useins, dout));
|
||||
|
||||
if (_plugins.front()->configure_io (useins, dout) == false) {
|
||||
if (_plugins.front()->reconfigure_io (useins, dout) == false) {
|
||||
PluginIoReConfigure (); /* EMIT SIGNAL */
|
||||
_configured = false;
|
||||
return false;
|
||||
@ -1994,7 +1994,7 @@ PluginInsert::configure_io (ChanCount in, ChanCount out)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (_plugins.front()->configure_io (in, out) == false) {
|
||||
if (_plugins.front()->reconfigure_io (in, out) == false) {
|
||||
PluginIoReConfigure (); /* EMIT SIGNAL */
|
||||
_configured = false;
|
||||
return false;
|
||||
@ -2261,7 +2261,7 @@ PluginInsert::internal_can_support_io_configuration (ChanCount const & inx, Chan
|
||||
out = inx; // hint
|
||||
if (out.n_midi () > 0 && out.n_audio () == 0) { out.set (DataType::AUDIO, 2); }
|
||||
if (out.n_audio () == 0) { out.set (DataType::AUDIO, 1); }
|
||||
bool const r = _plugins.front()->can_support_io_configuration (inx + sidechain_input_pins (), out, &useins);
|
||||
bool const r = _plugins.front()->match_variable_io (inx + sidechain_input_pins (), out, &useins);
|
||||
if (!r) {
|
||||
// houston, we have a problem.
|
||||
return Match (Impossible, 0);
|
||||
@ -2332,7 +2332,7 @@ PluginInsert::automatic_can_support_io_configuration (ChanCount const & inx, Cha
|
||||
out = in; // hint
|
||||
if (out.n_midi () > 0 && out.n_audio () == 0) { out.set (DataType::AUDIO, 2); }
|
||||
if (out.n_audio () == 0) { out.set (DataType::AUDIO, 1); }
|
||||
bool const r = _plugins.front()->can_support_io_configuration (in + sidechain_input_pins (), out);
|
||||
bool const r = _plugins.front()->match_variable_io (in + sidechain_input_pins (), out);
|
||||
if (!r) {
|
||||
return Match (Impossible, 0);
|
||||
}
|
||||
@ -3145,10 +3145,10 @@ PluginInsert::get_impulse_analysis_plugin()
|
||||
if (ret->get_info ()->reconfigurable_io ()) {
|
||||
// populate get_info ()->n_inputs and ->n_outputs
|
||||
ChanCount useins;
|
||||
ret->can_support_io_configuration (internal_input_streams (), out, &useins);
|
||||
ret->match_variable_io (internal_input_streams (), out, &useins);
|
||||
assert (out == internal_output_streams ());
|
||||
}
|
||||
ret->configure_io (internal_input_streams (), out);
|
||||
ret->reconfigure_io (internal_input_streams (), out);
|
||||
ret->set_owner (_owner);
|
||||
_impulseAnalysisPlugin = ret;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user