MCPcopy Create free account
hub / github.com/VCVRack/Befaco / onSampleRateChange

Method onSampleRateChange

src/Iroi.cpp:376–383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

374 }
375
376 void onSampleRateChange() override {
377 float newSampleRate = APP->engine->getSampleRate();
378 float oldSampleRate = patch->getPatchState()->sampleRate;
379 // this destroys and recreates the patch, so only do it if the sample rate has actually changed
380 if (newSampleRate != oldSampleRate) {
381 patch->updateSampleRateBlockSize(APP->engine->getSampleRate(), BLOCKSIZE);
382 }
383 }
384
385 void updatePatchParameters(PatchCtrls *patchCtrls, PatchCvs *patchCvs, Ui *ui) {
386 // Faders (also act as CV attenuators when CV is patched)

Callers

nothing calls this directly

Calls 1

getSampleRateMethod · 0.80

Tested by

no test coverage detected