Subclassing AUAudioUnit : how to declare supported numbers of I/O channels?

Dear all,


I'm working on custom AUAudioUnit for both iOS and macOS. For now, my AudioUnits are only integrated in my own app's AVAudioEngine, but I'm considering building AudioUnit extensions in the near future.


I'm trying to understand how to declare the numbers of channels and the channel layouts supported by my AudioUnit, which seems necessary for a proper AudioUnit extension distribution.


All I found for the moment is the following, in AUAudioUnit.h:

@interface AUAudioUnit : NSObject
[...]
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSArray *channelCapabilities;
[...]
@end

interface AUAudioUnitBus : NSObject
[...]
@property (NS_NONATOMIC_IOSONLY, readonly, copy, nullable) NSArray *supportedChannelLayoutTags;
[...]
@end


My questions are the following :


1. What should I do with my AUAudioUnit's channelCapabilities? Should I override it with a computed properties, or synthesize it manually?


2. I don't see any way to specify the supported channel layout tags on the input and output busses I instanciated for my AudioUnit, as supportedChannelLayoutTags is readonly. What I am supposed to do with it?


3. Is there anything else I missed on the subject?


Thank you all for your help 🙂


Tom