MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / updateLimiter

Method updateLimiter

src/audio/base/DspHost.cpp:129–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129void DspHost::updateLimiter(DspConfig* config)
130{
131 bool releaseExists;
132 bool thresholdExists;
133
134 float limThreshold = config->get<float>(DspConfig::master_limthreshold, &releaseExists);
135 float limRelease = config->get<float>(DspConfig::master_limrelease, &thresholdExists);
136
137 if(!releaseExists || !thresholdExists)
138 {
139 util::warning("Limiter threshold or limiter release unset. Using defaults.");
140
141 if(!releaseExists) limRelease = -0.1;
142 else if (!thresholdExists) limThreshold = 60;
143 }
144
145 if (limThreshold > -0.09)
146 {
147 limThreshold = -0.09;
148 }
149 if (limRelease < 0.15)
150 {
151 limRelease = 0.15;
152 }
153
154 JLimiterSetCoefficients(cast(this->_dsp), limThreshold, limRelease);
155}
156
157void DspHost::updateFirEqualizer(DspConfig *config)
158{

Callers

nothing calls this directly

Calls 2

castFunction · 0.85
JLimiterSetCoefficientsFunction · 0.50

Tested by

no test coverage detected