Proper coding is better; enabling and disabling freewheeling for real.

This commit is contained in:
Paul Ferrand 2019-12-08 18:48:08 +01:00
parent 0758e786cf
commit f80da93cfc
2 changed files with 17 additions and 2 deletions

View file

@ -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");
}
}

View file

@ -325,8 +325,8 @@ public:
*/
int getAllocatedBytes() const noexcept { return Buffer<float>::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