mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
VST3 Client: Fix warning when PreferredChannelConfigurations are set
This commit is contained in:
parent
27924e4996
commit
6ea3788a3b
1 changed files with 9 additions and 3 deletions
|
|
@ -3130,14 +3130,20 @@ public:
|
|||
|
||||
const auto countChannels = [] (auto& range)
|
||||
{
|
||||
return std::accumulate (range.begin(), range.end(), (short) 0, [] (auto acc, auto set)
|
||||
return std::accumulate (range.begin(), range.end(), 0, [] (auto acc, auto set)
|
||||
{
|
||||
return acc + set.size();
|
||||
});
|
||||
};
|
||||
|
||||
const ChannelPair requested { countChannels (desiredLayout.inputBuses),
|
||||
countChannels (desiredLayout.outputBuses) };
|
||||
const auto toShort = [] (int x)
|
||||
{
|
||||
jassert (0 <= x && x <= std::numeric_limits<short>::max());
|
||||
return (short) x;
|
||||
};
|
||||
|
||||
const ChannelPair requested { toShort (countChannels (desiredLayout.inputBuses)),
|
||||
toShort (countChannels (desiredLayout.outputBuses)) };
|
||||
const ChannelPair configs[] = { JucePlugin_PreferredChannelConfigurations };
|
||||
return std::find (std::begin (configs), std::end (configs), requested) != std::end (configs);
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue