mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-18 00:54:19 +00:00
Revised multibus API and added support for multibus hosting
This commit is contained in:
parent
ebf19aa61a
commit
4fa0516f40
140 changed files with 6836 additions and 4478 deletions
|
|
@ -147,7 +147,9 @@ private:
|
|||
|
||||
//==============================================================================
|
||||
JuceDemoPluginAudioProcessor::JuceDemoPluginAudioProcessor()
|
||||
: lastUIWidth (400),
|
||||
: AudioProcessor (BusesProperties().withInput ("Input", AudioChannelSet::stereo(), true)
|
||||
.withOutput ("Output", AudioChannelSet::stereo(), true)),
|
||||
lastUIWidth (400),
|
||||
lastUIHeight (200),
|
||||
gainParam (nullptr),
|
||||
delayParam (nullptr),
|
||||
|
|
@ -181,6 +183,24 @@ void JuceDemoPluginAudioProcessor::initialiseSynth()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
bool JuceDemoPluginAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
|
||||
{
|
||||
// Only mono/stereo and input/output must have same layout
|
||||
const AudioChannelSet& mainInput = layouts.getMainInputChannelSet();
|
||||
const AudioChannelSet& mainOutput = layouts.getMainOutputChannelSet();
|
||||
|
||||
// input and output layout must be the same
|
||||
if (mainInput != mainOutput) return false;
|
||||
|
||||
// do not allow disabling the main buses
|
||||
if (mainInput.isDisabled()) return false;
|
||||
|
||||
// only allow stereo and mono
|
||||
if (mainInput.size() > 2) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void JuceDemoPluginAudioProcessor::prepareToPlay (double newSampleRate, int /*samplesPerBlock*/)
|
||||
{
|
||||
// Use this method as the place to do any pre-playback
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue