Move MIDI filters imprecise handling from 2nd pass to 1st

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).
This commit is contained in:
Julien "_FrnchFrgg_" RIVAUD 2016-08-03 12:14:12 +02:00
parent 946a99f554
commit b90baf2176

View 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