OpenShot Audio Library | OpenShotAudio 0.3.2
|
#include <juce_AudioProcessLoadMeasurer.h>
Classes | |
struct | ScopedTimer |
Public Member Functions | |
~AudioProcessLoadMeasurer () | |
void | reset () |
void | reset (double sampleRate, int blockSize) |
double | getLoadAsProportion () const |
double | getLoadAsPercentage () const |
int | getXRunCount () const |
void | registerBlockRenderTime (double millisecondsTaken) |
Maintains an ongoing measurement of the proportion of time which is being spent inside an audio callback.
Definition at line 37 of file juce_AudioProcessLoadMeasurer.h.
juce::AudioProcessLoadMeasurer::AudioProcessLoadMeasurer | ( | ) |
Definition at line 30 of file juce_AudioProcessLoadMeasurer.cpp.
juce::AudioProcessLoadMeasurer::~AudioProcessLoadMeasurer | ( | ) |
Destructor.
Definition at line 31 of file juce_AudioProcessLoadMeasurer.cpp.
double juce::AudioProcessLoadMeasurer::getLoadAsPercentage | ( | ) | const |
Returns the current load as a percentage 0 to 100.0
Definition at line 65 of file juce_AudioProcessLoadMeasurer.cpp.
double juce::AudioProcessLoadMeasurer::getLoadAsProportion | ( | ) | const |
Returns the current load as a proportion 0 to 1.0
Definition at line 64 of file juce_AudioProcessLoadMeasurer.cpp.
Referenced by juce::AudioDeviceManager::getCpuUsage(), and getLoadAsPercentage().
int juce::AudioProcessLoadMeasurer::getXRunCount | ( | ) | const |
Returns the number of over- (or under-) runs recorded since the state was reset.
Definition at line 67 of file juce_AudioProcessLoadMeasurer.cpp.
Referenced by juce::AudioDeviceManager::getXRunCount().
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.
Definition at line 55 of file juce_AudioProcessLoadMeasurer.cpp.
void juce::AudioProcessLoadMeasurer::reset | ( | ) |
Resets the state.
Definition at line 33 of file juce_AudioProcessLoadMeasurer.cpp.
Referenced by juce::AudioDeviceManager::closeAudioDevice(), and reset().
Resets the counter, in preparation for use with the given sample rate and block size.
Definition at line 38 of file juce_AudioProcessLoadMeasurer.cpp.