MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / loadClientGateSettings

Method loadClientGateSettings

src/core/AudioEngine.cpp:4460–4488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4458}
4459
4460void 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
4490void AudioEngine::saveClientGateSettings() const
4491{

Callers

nothing calls this directly

Calls 12

setReturnDbMethod · 0.80
setHoldMsMethod · 0.80
setFloorDbMethod · 0.80
setLookaheadMsMethod · 0.80
setEnabledMethod · 0.45
toStringMethod · 0.45
valueMethod · 0.45
setModeMethod · 0.45
setThresholdDbMethod · 0.45
setRatioMethod · 0.45
setAttackMsMethod · 0.45
setReleaseMsMethod · 0.45

Tested by

no test coverage detected