| 1885 | } |
| 1886 | |
| 1887 | void 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 | |
| 1910 | float FireAudioProcessor::getTotalLatency() const |
| 1911 | { |
nothing calls this directly
no test coverage detected