JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

Impossible to create AU or AUv3 with 1x stereo out with n mono outs

Open izzyreal opened this issue 9 months ago • 3 comments

Detailed steps on how to reproduce the bug

Reproducers: https://github.com/izzyreal/JUCE/tree/develop-no-mono-au (see AUv3Synth example) https://github.com/izzyreal/juce-cmake-template/tree/au-no-mono

Exact same issue here: https://forum.juce.com/t/au-with-1xstereo-4xmono-output-buses/48557

Note that it's easy to create the desired layout in the Xcode AUv3 template by doing this:

- (void)setupAudioBuses {
    NSMutableArray<AUAudioUnitBus *> *busses = [NSMutableArray array];

    AVAudioFormat *stereoFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:44100 channels:2];
    _outputBus = [[AUAudioUnitBus alloc] initWithFormat:stereoFormat error:nil];
    _outputBus.maximumChannelCount = 2;
    _outputBus.supportedChannelCounts = @[@2];
    [busses addObject:_outputBus];

    for (int i = 0; i < 8; i++) {
        AVAudioFormat *monoFormat = [[AVAudioFormat alloc] initStandardFormatWithSampleRate:44100 channels:1];
        AUAudioUnitBus *bus = [[AUAudioUnitBus alloc] initWithFormat:monoFormat error:nil];
        bus.enabled = NO;
        bus.maximumChannelCount = 1;
        bus.supportedChannelCounts = @[@1];
        [busses addObject:bus];
    }

    _outputBusArray = [[AUAudioUnitBusArray alloc] initWithAudioUnit:self
                                                             busType:AUAudioUnitBusTypeOutput
                                                              busses:busses];
}

What is the expected behaviour?

AU or AUv3 with 1x stereo out with n mono outs

Operating systems

macOS

What versions of the operating systems?

14.7.3

Architectures

Arm64/aarch64

Stacktrace


Plug-in formats (if applicable)

AU, AUv3

Plug-in host applications (DAWs) (if applicable)

Logic

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

  • [x] I agree to follow the Code of Conduct

izzyreal avatar Feb 07 '25 10:02 izzyreal