Loading...
Searching...
No Matches
juce::AudioProcessLoadMeasurer Class Reference

## Detailed Description

Maintains an ongoing measurement of the proportion of time which is being spent inside an audio callback.

The documentation for this class was generated from the following file:

- juce_audio_basics/buffers/juce_AudioProcessLoadMeasurer.h

## Classes

struct | ScopedTimer
| This class measures the time between its construction and destruction and adds it to an AudioProcessLoadMeasurer. More...

## Public Member Functions

| AudioProcessLoadMeasurer ()
| ~AudioProcessLoadMeasurer ()
| Destructor.
void | reset ()
| Resets the state.
void | reset (double sampleRate, int blockSize)
| Resets the counter, in preparation for use with the given sample rate and block size.
double | getLoadAsProportion () const
| Returns the current load as a proportion 0 to 1.0.
double | getLoadAsPercentage () const
| Returns the current load as a percentage 0 to 100.0.
int | getXRunCount () const
| Returns the number of over- (or under-) runs recorded since the state was reset.
void | registerBlockRenderTime (double millisecondsTaken)
| Can be called manually to add the time of a callback to the stats.
void | registerRenderTime (double millisecondsTaken, int numSamples)
| Can be called manually to add the time of a callback to the stats.

## Constructors and Destructors

## AudioProcessLoadMeasurer()

juce::AudioProcessLoadMeasurer::AudioProcessLoadMeasurer | ( |  | ) |

Referenced by juce::AudioProcessLoadMeasurer::ScopedTimer::ScopedTimer(), juce::AudioProcessLoadMeasurer::ScopedTimer::ScopedTimer(), and juce::AudioProcessLoadMeasurer::ScopedTimer::~ScopedTimer().

## ~AudioProcessLoadMeasurer()

juce::AudioProcessLoadMeasurer::~AudioProcessLoadMeasurer | ( |  | ) |

Destructor.

## Member Functions

## reset() [1/2]

void juce::AudioProcessLoadMeasurer::reset | ( |  | ) |

Resets the state.

## 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.

## getLoadAsProportion()

double juce::AudioProcessLoadMeasurer::getLoadAsProportion | ( |  | ) | const

Returns the current load as a proportion 0 to 1.0.

## getLoadAsPercentage()

double juce::AudioProcessLoadMeasurer::getLoadAsPercentage | ( |  | ) | const

Returns the current load as a percentage 0 to 100.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.

## registerRenderTime()

void juce::AudioProcessLoadMeasurer::registerRenderTime | ( | double | millisecondsTaken,
|  | int | numSamples )

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.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited