Maintains an ongoing measurement of the proportion of time which is being spent inside an audio callback.
More...
#include <juce_AudioProcessLoadMeasurer.h>
Maintains an ongoing measurement of the proportion of time which is being spent inside an audio callback.
◆ AudioProcessLoadMeasurer()
juce::AudioProcessLoadMeasurer::AudioProcessLoadMeasurer |
( |
| ) |
|
◆ ~AudioProcessLoadMeasurer()
juce::AudioProcessLoadMeasurer::~AudioProcessLoadMeasurer |
( |
| ) |
|
◆ getLoadAsPercentage()
double juce::AudioProcessLoadMeasurer::getLoadAsPercentage |
( |
| ) |
const |
Returns the current load as a percentage 0 to 100.0.
◆ getLoadAsProportion()
double juce::AudioProcessLoadMeasurer::getLoadAsProportion |
( |
| ) |
const |
Returns the current load as a proportion 0 to 1.0.
◆ getXRunCount()
int juce::AudioProcessLoadMeasurer::getXRunCount |
( |
| ) |
const |
Returns the number of over- (or under-) runs recorded since the state was reset.
◆ registerBlockRenderTime()
void juce::AudioProcessLoadMeasurer::registerBlockRenderTime |
( |
double |
millisecondsTaken | ) |
|
Can be called manually to add the time of a callback to the stats.
Normally you probably would never call this - it's simpler and more robust to use a ScopedTimer to measure the time using an RAII pattern.
◆ reset() [1/2]
void juce::AudioProcessLoadMeasurer::reset |
( |
| ) |
|
◆ reset() [2/2]
void juce::AudioProcessLoadMeasurer::reset |
( |
double |
sampleRate, |
|
|
int |
blockSize |
|
) |
| |
Resets the counter, in preparation for use with the given sample rate and block size.
◆ cpuUsageMs
double juce::AudioProcessLoadMeasurer::cpuUsageMs = 0 |
|
private |
◆ msPerBlock
double juce::AudioProcessLoadMeasurer::msPerBlock = 0 |
|
private |
◆ timeToCpuScale
double juce::AudioProcessLoadMeasurer::timeToCpuScale = 0 |
|
private |
◆ xruns
int juce::AudioProcessLoadMeasurer::xruns = 0 |
|
private |
The documentation for this class was generated from the following file: