| 615 | } |
| 616 | |
| 617 | void ClientChainWidget::toggleStageBypass(int boxIdx) |
| 618 | { |
| 619 | if (!m_audio) return; |
| 620 | if (boxIdx < 0 || boxIdx >= m_boxes.size()) return; |
| 621 | if (m_boxes[boxIdx].isEndpoint) return; |
| 622 | const auto stage = m_boxes[boxIdx].stage; |
| 623 | if (!isStageImplemented(stage)) return; |
| 624 | |
| 625 | const bool newEnabled = isStageBypassed(stage); // was off → turn on |
| 626 | switch (stage) { |
| 627 | case AudioEngine::TxChainStage::Eq: |
| 628 | if (m_audio->clientEqTx()) { |
| 629 | m_audio->clientEqTx()->setEnabled(newEnabled); |
| 630 | m_audio->saveClientEqSettings(); |
| 631 | } |
| 632 | break; |
| 633 | case AudioEngine::TxChainStage::Comp: |
| 634 | if (m_audio->clientCompTx()) { |
| 635 | m_audio->clientCompTx()->setEnabled(newEnabled); |
| 636 | m_audio->saveClientCompSettings(); |
| 637 | } |
| 638 | break; |
| 639 | case AudioEngine::TxChainStage::Gate: |
| 640 | if (m_audio->clientGateTx()) { |
| 641 | m_audio->clientGateTx()->setEnabled(newEnabled); |
| 642 | m_audio->saveClientGateSettings(); |
| 643 | } |
| 644 | break; |
| 645 | case AudioEngine::TxChainStage::DeEss: |
| 646 | if (m_audio->clientDeEssTx()) { |
| 647 | m_audio->clientDeEssTx()->setEnabled(newEnabled); |
| 648 | m_audio->saveClientDeEssSettings(); |
| 649 | } |
| 650 | break; |
| 651 | case AudioEngine::TxChainStage::Tube: |
| 652 | if (m_audio->clientTubeTx()) { |
| 653 | m_audio->clientTubeTx()->setEnabled(newEnabled); |
| 654 | m_audio->saveClientTubeSettings(); |
| 655 | } |
| 656 | break; |
| 657 | case AudioEngine::TxChainStage::Enh: |
| 658 | if (m_audio->clientPuduTx()) { |
| 659 | m_audio->clientPuduTx()->setEnabled(newEnabled); |
| 660 | m_audio->saveClientPuduSettings(); |
| 661 | } |
| 662 | break; |
| 663 | case AudioEngine::TxChainStage::Reverb: |
| 664 | if (m_audio->clientReverbTx()) { |
| 665 | m_audio->clientReverbTx()->setEnabled(newEnabled); |
| 666 | m_audio->saveClientReverbSettings(); |
| 667 | } |
| 668 | break; |
| 669 | default: |
| 670 | return; |
| 671 | } |
| 672 | emit stageEnabledChanged(stage, newEnabled); |
| 673 | update(); |
| 674 | } |
nothing calls this directly
no test coverage detected