move "needs output port selector" (from pin-dialog) to backend
This commit is contained in:
@@ -164,6 +164,10 @@ class LIBARDOUR_API PluginInsert : public Processor
|
||||
bool has_no_inputs() const;
|
||||
bool has_no_audio_inputs() const;
|
||||
bool needs_midi_input() const;
|
||||
bool has_output_presets (
|
||||
ChanCount in = ChanCount (DataType::MIDI, 1),
|
||||
ChanCount out = ChanCount (DataType::AUDIO, 2)
|
||||
);
|
||||
|
||||
void realtime_handle_transport_stopped ();
|
||||
void realtime_locate ();
|
||||
|
||||
@@ -375,6 +375,35 @@ PluginInsert::needs_midi_input() const
|
||||
return pip->n_inputs.n_midi() != 0 && pip->n_outputs.n_audio() != 0;
|
||||
}
|
||||
|
||||
bool
|
||||
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);
|
||||
}
|
||||
|
||||
PluginOutputConfiguration ppc (_plugins[0]->possible_output ());
|
||||
|
||||
if (ppc.size () == 0) {
|
||||
return false;
|
||||
}
|
||||
if (!strict_io () && ppc.size () == 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (strict_io () && ppc.size () == 1) {
|
||||
// "stereo" is currently preferred default for instruments
|
||||
if (ppc.find (2) != ppc.end ()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!needs_midi_input ()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
PluginInsert::create_automatable_parameters ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user