MCPcopy Create free account
hub / github.com/jerryuhoo/Fire / updateGlobalFilters

Method updateGlobalFilters

Source/PluginProcessor.cpp:1887–1908  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1885}
1886
1887void FireAudioProcessor::updateGlobalFilters(double sampleRate)
1888{
1889 // Get the final, modulated settings for the entire filter chain.
1890 auto chainSettings = getChainSettings(treeState, *lfoManager);
1891
1892 // It's good practice to ensure frequencies are within a valid range.
1893 const float minFreq = 20.0f;
1894 float maxFreq = sampleRate / 2.0f;
1895
1896 if (maxFreq < minFreq)
1897 maxFreq = minFreq;
1898
1899 // Clamp frequencies to be safe.
1900 chainSettings.lowCutFreq = juce::jlimit(minFreq, maxFreq, chainSettings.lowCutFreq);
1901 chainSettings.peakFreq = juce::jlimit(minFreq, maxFreq, chainSettings.peakFreq);
1902 chainSettings.highCutFreq = juce::jlimit(minFreq, maxFreq, chainSettings.highCutFreq);
1903
1904 // Call the modular update functions with the final settings.
1905 updateLowCutFilters(chainSettings, sampleRate);
1906 updatePeakFilter(chainSettings, sampleRate);
1907 updateHighCutFilters(chainSettings, sampleRate);
1908}
1909
1910float FireAudioProcessor::getTotalLatency() const
1911{

Callers

nothing calls this directly

Calls 1

getChainSettingsFunction · 0.85

Tested by

no test coverage detected