diff options
author | Robin Gareus <robin@gareus.org> | 2016-10-07 20:55:21 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-10-07 20:55:21 +0200 |
commit | 97111b0ec2dd79d4fb4938f3c66cb86c59e7990d (patch) | |
tree | 7bf729073848ddeaae89a9a4de614f2e481609f6 /libs/ardour/plugin.cc | |
parent | b497bb9db42a4a7087168e4a153780d702d262de (diff) |
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)
Diffstat (limited to 'libs/ardour/plugin.cc')
-rw-r--r-- | libs/ardour/plugin.cc | 8 |
1 files changed, 7 insertions, 1 deletions
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 @@ -82,9 +82,15 @@ static bool seen_set_state_message = false; PBD::Signal2<void, std::string, Plugin*> 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) |