| 4458 | } |
| 4459 | |
| 4460 | void AudioEngine::loadClientGateSettings() |
| 4461 | { |
| 4462 | if (!m_clientGateTx) return; |
| 4463 | auto& s = AppSettings::instance(); |
| 4464 | m_clientGateTx->setEnabled( |
| 4465 | s.value("ClientGateTxEnabled", "False").toString() == "True"); |
| 4466 | // Mode first — it snaps ratio + floor to presets, so apply before |
| 4467 | // those two so a persisted mode doesn't overwrite a custom ratio. |
| 4468 | const int modeInt = s.value("ClientGateTxMode", "0").toInt(); |
| 4469 | m_clientGateTx->setMode(modeInt == 1 |
| 4470 | ? ClientGate::Mode::Gate |
| 4471 | : ClientGate::Mode::Expander); |
| 4472 | m_clientGateTx->setThresholdDb( |
| 4473 | s.value("ClientGateTxThresholdDb", "-40.0").toFloat()); |
| 4474 | m_clientGateTx->setReturnDb( |
| 4475 | s.value("ClientGateTxReturnDb", "2.0").toFloat()); |
| 4476 | m_clientGateTx->setRatio( |
| 4477 | s.value("ClientGateTxRatio", "2.0").toFloat()); |
| 4478 | m_clientGateTx->setAttackMs( |
| 4479 | s.value("ClientGateTxAttackMs", "0.5").toFloat()); |
| 4480 | m_clientGateTx->setHoldMs( |
| 4481 | s.value("ClientGateTxHoldMs", "20.0").toFloat()); |
| 4482 | m_clientGateTx->setReleaseMs( |
| 4483 | s.value("ClientGateTxReleaseMs", "100.0").toFloat()); |
| 4484 | m_clientGateTx->setFloorDb( |
| 4485 | s.value("ClientGateTxFloorDb", "-15.0").toFloat()); |
| 4486 | m_clientGateTx->setLookaheadMs( |
| 4487 | s.value("ClientGateTxLookaheadMs", "0.0").toFloat()); |
| 4488 | } |
| 4489 | |
| 4490 | void AudioEngine::saveClientGateSettings() const |
| 4491 | { |
nothing calls this directly
no test coverage detected