You can’t addIfNotAlreadyThere into a std::set
std::vector<AudioChannelLayoutTag> getSupportedLayoutTagsForBus (bool isInput, int busNum) const
{
std::set<AudioChannelLayoutTag> tags;
if (AudioProcessor::Bus* bus = juceFilter->getBus (isInput, busNum))
{
#ifndef JucePlugin_PreferredChannelConfigurations
auto& knownTags = CoreAudioLayouts::getKnownCoreAudioTags();
for (auto tag : knownTags)
if (bus->isLayoutSupported (CoreAudioLayouts::fromCoreAudio (tag)))
tags.insert (tag);
#endif
// add discrete layout tags
int n = bus->getMaxSupportedChannels (maxChannelsToProbeFor());
for (int ch = 0; ch < n; ++ch)
{
#ifdef JucePlugin_PreferredChannelConfigurations
const short configs[][2] = { JucePlugin_PreferredChannelConfigurations };
if (AudioUnitHelpers::isLayoutSupported (*juceFilter, isInput, busNum, ch, configs))
tags.addIfNotAlreadyThere (static_cast<AudioChannelLayoutTag> ((int) kAudioChannelLayoutTag_DiscreteInOrder | ch));
#else
if (bus->isLayoutSupported (AudioChannelSet::discreteChannels (ch)))
tags.insert (static_cast<AudioChannelLayoutTag> ((int) kAudioChannelLayoutTag_DiscreteInOrder | ch));
#endif
}
}
return std::vector<AudioChannelLayoutTag> (tags.begin(), tags.end());
}
