Browse Source

AU: Don't set kAudioUnitProperty_AudioChannelLayout property on plug-ins that don't support it

tags/2021-05-28
ed 6 years ago
parent
commit
2b542dc701
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm

+ 10
- 10
modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm View File

@@ -781,19 +781,19 @@ public:
// try to convert the layout into a tag // try to convert the layout into a tag
actualTag = CoreAudioLayouts::toCoreAudio (CoreAudioLayouts::fromCoreAudio (layout)); actualTag = CoreAudioLayouts::toCoreAudio (CoreAudioLayouts::fromCoreAudio (layout));
}
if (actualTag != requestedTag)
{
zerostruct (layout);
layout.mChannelLayoutTag = requestedTag;
if (actualTag != requestedTag)
{
zerostruct (layout);
layout.mChannelLayoutTag = requestedTag;
err = AudioUnitSetProperty (audioUnit, kAudioUnitProperty_AudioChannelLayout, scope, static_cast<UInt32> (i), &layout, minDataSize);
err = AudioUnitSetProperty (audioUnit, kAudioUnitProperty_AudioChannelLayout, scope, static_cast<UInt32> (i), &layout, minDataSize);
// only bail out if the plug-in claims to support layouts
// See AudioUnit headers on kAudioUnitProperty_AudioChannelLayout
if (err != noErr && supportsLayouts && isInitialized)
return false;
// only bail out if the plug-in claims to support layouts
// See AudioUnit headers on kAudioUnitProperty_AudioChannelLayout
if (err != noErr && supportsLayouts && isInitialized)
return false;
}
} }
} }
} }


Loading…
Cancel
Save