Move MIDI filters imprecise handling from 2nd pass to 1st
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Wed, 3 Aug 2016 10:14:12 +0000 (12:14 +0200)
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Sat, 6 Aug 2016 17:38:09 +0000 (19:38 +0200)
This doesn't change the policy since configurations are given an
additional 1000 penalty if audio_in != possible_in, and will thus be
trumped by any "precise" configuration (unless the latter has 1000
excess or missing outputs which should be less than likely).

libs/ardour/luaproc.cc

index 35f43b5dc10d41f949a6983ef0172b6ef4be7ce0..9b9b7fa46dfa79853b15182e5fc5da6195b7e655 100644 (file)
@@ -453,6 +453,9 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
                                if (audio_in == 0) {
                                        FOUNDCFG(possible_out);
                                        break;
+                               } else if (imprecise) {
+                                       // TODO hide audio input from plugin
+                                       FOUNDCFG_IMPRECISE (possible_in, possible_out);
                                }
                        }
                        continue;
@@ -533,12 +536,6 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
                        int possible_out = io["audio_out"].isNumber() ? io["audio_out"] : -1;
                        int possible_midiin = _has_midi_input ? 1 : 0;
 
-                       if (possible_out == 0 && possible_in == 0 && _has_midi_output) {
-                               assert (audio_in > 0); // no input is handled above
-                               // TODO hide audio input from plugin
-                               FOUNDCFG_IMPRECISE (possible_in, possible_out);
-                               continue;
-                       }
 
                        assert (possible_in > 0); // all other cases will have been matched above