mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
Make the configuration penalty subtler about inputs
Instead of uniformly demote configurations with a non-matching audio input count (using a penalty offset of 1000), also grade the impreciseness of the configuration so that those with the nearest input count are preferred. As for outputs, give a slightly higher handicap to configuration with too many inputs with regard to the actual audio inputs that can be fed to the plugin. POLICY CHANGE: when only imprecise configurations are found the actually selected one can be different (better) than before this commit.
This commit is contained in:
parent
fe4d0f67e4
commit
a4474e95a4
1 changed files with 5 additions and 7 deletions
|
|
@ -1381,11 +1381,11 @@ AUPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& out, Cha
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FOUNDCFG_IMPRECISE(in, out) { \
|
#define FOUNDCFG_IMPRECISE(in, out) { \
|
||||||
float p = fabsf ((float)(out) - preferred_out); \
|
const float p = \
|
||||||
if (in != audio_in) { \
|
fabsf ((float)(out) - preferred_out) * \
|
||||||
p += 1000; \
|
(((out) > preferred_out) ? 1.1 : 1) \
|
||||||
} \
|
+ fabsf ((float)(in) - audio_in) * \
|
||||||
if ((out) > preferred_out) { p *= 1.1; } \
|
(((in) > audio_in) ? 275 : 250); \
|
||||||
FOUNDCFG_PENALTY(in, out, p); \
|
FOUNDCFG_PENALTY(in, out, p); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1483,8 +1483,6 @@ AUPlugin::can_support_io_configuration (const ChanCount& in, ChanCount& out, Cha
|
||||||
* Really imprecise only if desired_in != audio_in */
|
* Really imprecise only if desired_in != audio_in */
|
||||||
FOUNDCFG_IMPRECISE (desired_in, possible_out);
|
FOUNDCFG_IMPRECISE (desired_in, possible_out);
|
||||||
}
|
}
|
||||||
// ideally we'll also find the closest, best matching
|
|
||||||
// input configuration with minimal output penalty...
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue