Remove ad-hoc handling of possible_out == 0
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Thu, 4 Aug 2016 08:11:21 +0000 (10:11 +0200)
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Sat, 6 Aug 2016 17:38:09 +0000 (19:38 +0200)
Just refuse configurations without any output at all, and let the
remaining logic take care of selecting configurations with no audio
output if they make sense and there are no better configurations.

POLICY CHANGE: configurations with no output might now be considered
even if they have audio inputs (e.g. a pure pitch detector without audio
passthrough), whereas they were skipped before.

libs/ardour/luaproc.cc

index 09be770b0a9bd2b4719acfdfffe68d58832d124e..35e39fe4ebaade3b4f83e988049844be564073dd 100644 (file)
@@ -445,19 +445,8 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
                        FOUNDCFG_PENALTY(audio_in, preferred_out, -1);
                }
 
                        FOUNDCFG_PENALTY(audio_in, preferred_out, -1);
                }
 
-               // "imprecise" matches
-               if (possible_out == 0) {
-                       /* skip configurations with no audio output, unless
-                        * the plugin is a midi filter or generator */
-                       if (possible_in == 0 && _has_midi_output) {
-                               if (audio_in == 0) {
-                                       FOUNDCFG(possible_out);
-                                       break;
-                               } else if (imprecise) {
-                                       // TODO hide audio input from plugin
-                                       FOUNDCFG_IMPRECISE (possible_in, possible_out);
-                               }
-                       }
+               if (possible_out == 0 && possible_midiout == 0) {
+                       /* skip configurations with no output at all */
                        continue;
                }
 
                        continue;
                }