| 523 | } |
| 524 | |
| 525 | void StripRxChainWidget::toggleStageBypass(int boxIdx) |
| 526 | { |
| 527 | if (!m_audio) return; |
| 528 | if (boxIdx < 0 || boxIdx >= m_boxes.size()) return; |
| 529 | if (m_boxes[boxIdx].kind != TileKind::Stage) return; |
| 530 | const auto stage = m_boxes[boxIdx].stage; |
| 531 | if (!isStageImplemented(stage)) return; |
| 532 | |
| 533 | const bool newEnabled = isStageBypassed(stage); |
| 534 | switch (stage) { |
| 535 | case AudioEngine::RxChainStage::Eq: |
| 536 | if (auto* eq = m_audio->clientEqRx()) { |
| 537 | eq->setEnabled(newEnabled); |
| 538 | m_audio->saveClientEqSettings(); |
| 539 | } |
| 540 | break; |
| 541 | case AudioEngine::RxChainStage::Gate: |
| 542 | if (auto* g = m_audio->clientGateRx()) { |
| 543 | g->setEnabled(newEnabled); |
| 544 | m_audio->saveClientGateRxSettings(); |
| 545 | } |
| 546 | break; |
| 547 | case AudioEngine::RxChainStage::Comp: |
| 548 | if (auto* c = m_audio->clientCompRx()) { |
| 549 | c->setEnabled(newEnabled); |
| 550 | m_audio->saveClientCompRxSettings(); |
| 551 | } |
| 552 | break; |
| 553 | case AudioEngine::RxChainStage::Tube: |
| 554 | if (auto* t = m_audio->clientTubeRx()) { |
| 555 | t->setEnabled(newEnabled); |
| 556 | m_audio->saveClientTubeRxSettings(); |
| 557 | } |
| 558 | break; |
| 559 | case AudioEngine::RxChainStage::Pudu: |
| 560 | if (auto* p = m_audio->clientPuduRx()) { |
| 561 | p->setEnabled(newEnabled); |
| 562 | m_audio->saveClientPuduRxSettings(); |
| 563 | } |
| 564 | break; |
| 565 | case AudioEngine::RxChainStage::DeEss: |
| 566 | if (auto* d = m_audio->clientDeEssRx()) { |
| 567 | d->setEnabled(newEnabled); |
| 568 | m_audio->saveClientDeEssRxSettings(); |
| 569 | } |
| 570 | break; |
| 571 | default: |
| 572 | return; |
| 573 | } |
| 574 | emit stageEnabledChanged(stage, newEnabled); |
| 575 | update(); |
| 576 | } |
| 577 | |
| 578 | void StripRxChainWidget::contextMenuEvent(QContextMenuEvent* ev) |
| 579 | { |
nothing calls this directly
no test coverage detected