mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 00:34:59 +01:00
VST3: handle edge-case when user removes optional aux ports
This commit is contained in:
parent
8e051bb488
commit
d5464b39db
1 changed files with 2 additions and 5 deletions
|
|
@ -354,18 +354,15 @@ VST3Plugin::reconfigure_io (ChanCount in, ChanCount aux_in, ChanCount out)
|
|||
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3Plugin::reconfigure_io in: %1 aux: %2 out: %3 ; n_in=%4 n_out=%5\n",
|
||||
in, aux_in, out, _plug->n_audio_inputs (), _plug->n_audio_outputs ()));
|
||||
|
||||
assert (_plug->n_audio_inputs () >= in.n_audio () + aux_in.n_audio ());
|
||||
assert (_plug->n_audio_outputs () >= out.n_audio ());
|
||||
|
||||
_connected_inputs.clear ();
|
||||
_connected_inputs.resize (in.n_audio () + aux_in.n_audio ());
|
||||
_connected_inputs.flip ();
|
||||
_connected_inputs.resize (_plug->n_audio_inputs ());
|
||||
_connected_inputs.resize (std::max (_plug->n_audio_inputs (), in.n_audio () + aux_in.n_audio ()));
|
||||
|
||||
_connected_outputs.clear ();
|
||||
_connected_outputs.resize (out.n_audio ());
|
||||
_connected_outputs.flip ();
|
||||
_connected_outputs.resize (_plug->n_audio_outputs ());
|
||||
_connected_outputs.resize (std::max (_plug->n_audio_outputs (), out.n_audio ()));
|
||||
|
||||
_plug->enable_io (_connected_inputs, _connected_outputs);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue