| 355 | } |
| 356 | |
| 357 | void 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 | |
| 384 | juce::AudioProcessor* JUCE_CALLTYPE |
| 385 |
nothing calls this directly
no outgoing calls
no test coverage detected