Hey all,
edit:
I’ve edited this post to show the working solution as well as the first attempt.
you may be doing something like this to construct audio processors:
TestAudioProcessor::TestAudioProcessor()
: AudioProcessor (BusesProperties()
.withInput ("Input", AudioChannelSet::stereo(), true)
.withOutput ("Output", AudioChannelSet::stereo(), true)
)
this is great for a couple inputs & ouputs, but if you have crazy complex processors, you may want to do something like this to keep things more standardized:
class TestAudioProcessorBusesProperties : public BusesProperties
{
public:
TestAudioProcessorBusesProperties() {
withInput ("Input", AudioChannelSet::stereo(), true);
withOutput ("Output", AudioChannelSet::stereo(), true);
}
~TestAudioProcessorBusesProperties() { }
}
Well, that doesn’t appear to work, but, you can define a simple function right inside of the class such as this:
AudioProcessor::BusesProperties TestNodeBusesProperties()
{
return BusesProperties()
.withInput("InputLeft", AudioChannelSet::mono(), true)
.withInput("InputRight", AudioChannelSet::mono(), true)
.withInput("OtherInput1", AudioChannelSet::mono(), true)
.withInput("OtherInput2", AudioChannelSet::mono(), true)
.withOutput("OutputLeft", AudioChannelSet::mono(), true)
.withOutput("OutputRight", AudioChannelSet::mono(), true);
}
and then the constructor could be something like:
TestAudioProcessor::TestAudioProcessor()
: AudioProcessor (TestNodeBusesProperties())
{
}
now the constructor is all neat and you can easily jump into the buses properties to check them out
Thanks @dave96!