mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 04:09:29 +01:00
Take midi into account for penalty computation
Demote configurations if they have mismatched midi in or out with the same mechanism as for audio, but with lower coefficients so that mismatched midi has less influence than mismatched audio in selecting the best configuration. POLICY CHANGE.
This commit is contained in:
parent
5691abdf03
commit
79f66a36b4
1 changed files with 6 additions and 1 deletions
|
|
@ -379,6 +379,7 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
|
|||
|
||||
// preferred setting (provided by plugin_insert)
|
||||
const int preferred_out = out.n_audio ();
|
||||
const int preferred_midiout = out.n_midi ();
|
||||
|
||||
int midi_out = -1;
|
||||
int audio_out = -1;
|
||||
|
|
@ -402,8 +403,12 @@ LuaProc::can_support_io_configuration (const ChanCount& in, ChanCount& out, Chan
|
|||
#define FOUNDCFG_IMPRECISE(in, out) { \
|
||||
const float p = fabsf ((float)(out) - preferred_out) * \
|
||||
(((out) > preferred_out) ? 1.1 : 1) \
|
||||
+ fabsf ((float)possible_midiout - preferred_midiout) * \
|
||||
((possible_midiout - preferred_midiout) ? 0.6 : 0.5) \
|
||||
+ fabsf ((float)(in) - audio_in) * \
|
||||
(((in) > audio_in) ? 275 : 250); \
|
||||
(((in) > audio_in) ? 275 : 250) \
|
||||
+ fabsf ((float)possible_midiin - midi_in) * \
|
||||
((possible_midiin - midi_in) ? 100 : 110); \
|
||||
FOUNDCFG_PENALTY(in, out, p); \
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue