Proper coding is better; enabling and disabling freewheeling for real.
This commit is contained in:
parent
0758e786cf
commit
f80da93cfc
2 changed files with 17 additions and 2 deletions
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue