From 97111b0ec2dd79d4fb4938f3c66cb86c59e7990d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 7 Oct 2016 20:55:21 +0200 Subject: Clean up is_instrument vs needs-midi-in API The latter is only really relevant for Audio Units. This fixes an issue with vocoders or audio-plugins that simply have a MIDI input for other purposes to be wrongly categorized as Instruments.. .. and thereby override strict-i/o rules (prefer stereo) --- libs/ardour/plugin.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libs/ardour/plugin.cc') diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index 7d04c3f5d7..f76f96af7a 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -81,10 +81,16 @@ static bool seen_set_state_message = false; PBD::Signal2 Plugin::PresetsChanged; +bool +PluginInfo::needs_midi_input () const +{ + return (n_inputs.n_midi() != 0); +} + bool PluginInfo::is_instrument () const { - return (n_inputs.n_midi() != 0) && (n_outputs.n_audio() > 0); + return (n_inputs.n_midi() != 0) && (n_outputs.n_audio() > 0) && (n_inputs.n_audio() == 0); } Plugin::Plugin (AudioEngine& e, Session& s) -- cgit v1.2.3