A counter which can be used to limit the frequency for eg. More...
Public Member Functions | |
ExecutionLimiter () | |
creates a new UpdateMerger and registeres the given listener. More... | |
void | limitFromBlockSizeToFrameRate (double sampleRate, int blockSize) noexcept |
A handy method to limit updates from buffer block to frame rate level. More... | |
void | setManualCountLimit (int skipAmount) |
sets a manual skip number. More... | |
bool | shouldUpdate () noexcept |
Call this method whenever something changes and the UpdateMerger class will check if a update is necessary. More... | |
bool | shouldUpdate (int stepsToSkip) |
Call this method whenever something changes and the UpdateMerger class will check if a update is necessary. More... | |
A counter which can be used to limit the frequency for eg.
GUI updates
If set up correctly using either limitFromSampleRateToFrameRate() or limitFromBlockSizeToFrameRate(), it has an internal counter that is incremented each time update() is called and returns true, if a new change message is due.
|
inline |
creates a new UpdateMerger and registeres the given listener.
|
inlinenoexcept |
A handy method to limit updates from buffer block to frame rate level.
Use this if you intend to call update() every buffer block.
|
inline |
sets a manual skip number.
Use this if you don't need the fancy block -> frame conversion.
|
inlinenoexcept |
Call this method whenever something changes and the UpdateMerger class will check if a update is necessary.
true
if a update should be made or false
if not.
|
inline |
Call this method whenever something changes and the UpdateMerger class will check if a update is necessary.
You can pass a step amount if you want to merge some steps. If the count limit is reached, the overshoot will be retained.