Skip to content

Commit

Permalink
Merge pull request #337 from showlabor/channelconfig
Browse files Browse the repository at this point in the history
Use buses API for channel configuration
  • Loading branch information
asb2m10 authored Apr 8, 2022
2 parents 764db74 + 2f59cc5 commit 1df9a58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
#endif

//==============================================================================
DexedAudioProcessor::DexedAudioProcessor() {
DexedAudioProcessor::DexedAudioProcessor()
: AudioProcessor(BusesProperties().withOutput("output", AudioChannelSet::stereo(), true)) {
#ifdef DEBUG

// avoid creating the log file if it is in standalone mode
Expand Down Expand Up @@ -723,6 +724,11 @@ bool DexedAudioProcessor::isOutputChannelStereoPair (int index) const {
return true;
}

bool DexedAudioProcessor::isBusesLayoutSupported(const BusesLayout &layouts) const {
return layouts.getMainOutputChannelSet() == AudioChannelSet::mono()
|| layouts.getMainOutputChannelSet() == AudioChannelSet::stereo();
}

bool DexedAudioProcessor::acceptsMidi() const {
return true;
}
Expand Down
1 change: 1 addition & 0 deletions Source/PluginProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public :
const String getOutputChannelName (int channelIndex) const;
bool isInputChannelStereoPair (int index) const;
bool isOutputChannelStereoPair (int index) const;
bool isBusesLayoutSupported (const BusesLayout& layouts) const;

bool acceptsMidi() const;
bool producesMidi() const;
Expand Down

0 comments on commit 1df9a58

Please sign in to comment.