MCPcopy Create free account
hub / github.com/ZL-Audio/ZLEqualizer / updateChannelLayout

Method updateChannelLayout

source/PluginProcessor.cpp:357–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355}
356
357void PluginProcessor::updateChannelLayout() {
358 // determine current channel layout
359 const auto* main_bus = getBus(true, 0);
360 const auto* aux_bus = getBus(true, 1);
361 channel_layout_ = ChannelLayout::kInvalid;
362 if (main_bus == nullptr) {
363 return;
364 }
365 if (main_bus->getCurrentLayout() == juce::AudioChannelSet::mono()) {
366 if (aux_bus == nullptr || !aux_bus->isEnabled()) {
367 channel_layout_ = ChannelLayout::kMain1Aux0;
368 } else if (aux_bus->getCurrentLayout() == juce::AudioChannelSet::mono()) {
369 channel_layout_ = ChannelLayout::kMain1Aux1;
370 } else if (aux_bus->getCurrentLayout() == juce::AudioChannelSet::stereo()) {
371 channel_layout_ = ChannelLayout::kMain1Aux2;
372 }
373 } else if (main_bus->getCurrentLayout() == juce::AudioChannelSet::stereo()) {
374 if (aux_bus == nullptr || !aux_bus->isEnabled()) {
375 channel_layout_ = ChannelLayout::kMain2Aux0;
376 } else if (aux_bus->getCurrentLayout() == juce::AudioChannelSet::mono()) {
377 channel_layout_ = ChannelLayout::kMain2Aux1;
378 } else if (aux_bus->getCurrentLayout() == juce::AudioChannelSet::stereo()) {
379 channel_layout_ = ChannelLayout::kMain2Aux2;
380 }
381 }
382}
383
384juce::AudioProcessor* JUCE_CALLTYPE
385

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected