MCPcopy Create free account
hub / github.com/DISTRHO/DPF / sampleRateChanged

Function sampleRateChanged

examples/Metronome/ExamplePluginMetronome.cpp:347–355  ·  view source on GitHub ↗

Optional callback to inform the plugin about a sample rate change. This function will only be called when the plugin is deactivated. */

Source from the content-addressed store, hash-verified

345 This function will only be called when the plugin is deactivated.
346 */
347 void sampleRateChanged(double newSampleRate) override
348 {
349 sampleRate = newSampleRate;
350
351 // Cutoff value was tuned manually.
352 deltaPhaseSmoother.setCutoff(sampleRate, 100.0f);
353 gainSmoother.setCutoff(sampleRate, 500.0f);
354 envelopeSmoother.setCutoff(sampleRate, 250.0f);
355 }
356
357 // -------------------------------------------------------------------------------------------------------
358

Callers 1

ExamplePluginMetronomeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected