diff --git a/src/sfizz/Synth.cpp b/src/sfizz/Synth.cpp index 401c1610..3ad7a76c 100644 --- a/src/sfizz/Synth.cpp +++ b/src/sfizz/Synth.cpp @@ -572,3 +572,18 @@ uint32_t sfz::Synth::getPreloadSize() const noexcept { return resources.filePool.getPreloadSize(); } + +void sfz::Synth::enableFreeWheeling() noexcept +{ + if (!freeWheeling) { + freeWheeling = true; + DBG("Enabling freewheeling"); + } +} +void sfz::Synth::disableFreeWheeling() noexcept +{ + if (freeWheeling) { + freeWheeling = false; + DBG("Disabling freewheeling"); + } +} diff --git a/src/sfizz/Synth.h b/src/sfizz/Synth.h index ce181284..99da4fac 100644 --- a/src/sfizz/Synth.h +++ b/src/sfizz/Synth.h @@ -325,8 +325,8 @@ public: */ int getAllocatedBytes() const noexcept { return Buffer::counter().getTotalBytes(); } - void enableFreeWheeling() { freeWheeling = true; } - void disableFreeWheeling() { freeWheeling = true; } + void enableFreeWheeling() noexcept; + void disableFreeWheeling() noexcept; protected: /** * @brief The parser callback; this is called by the parent object each time