mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-02 03:20:06 +00:00
Do not report AU layout if the AudioUnit is only mono or stereo
This commit is contained in:
parent
7e268231ab
commit
3af553e34f
1 changed files with 19 additions and 0 deletions
|
|
@ -509,6 +509,10 @@ public:
|
|||
AudioChannelLayout *outLayoutPtr,
|
||||
Boolean &outWritable)
|
||||
{
|
||||
// fallback to old code if this plug-in does not have multi channel IO
|
||||
if (! hasMultiChannelConfiguration())
|
||||
return 0;
|
||||
|
||||
if (element == 0 && (scope == kAudioUnitScope_Output || scope == kAudioUnitScope_Input))
|
||||
{
|
||||
outWritable = false;
|
||||
|
|
@ -1404,6 +1408,21 @@ private:
|
|||
SetAFactoryPresetAsCurrent (currentPreset);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
bool hasMultiChannelConfiguration () noexcept
|
||||
{
|
||||
for (int i = 0; i < numChannelConfigs; ++i)
|
||||
{
|
||||
#if !JucePlugin_IsSynth
|
||||
if (channelConfigs[i][0] > 2)
|
||||
return true;
|
||||
#endif
|
||||
if (channelConfigs[i][1] > 2)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
JUCE_DECLARE_NON_COPYABLE (JuceAU)
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue