daisy::CpuLoadMeter¶
#include <CpuLoadMeter.h>
Public Functions¶
Name | |
---|---|
CpuLoadMeter() | |
void | Init(float sampleRateInHz, int blockSizeInSamples, float smoothingFilterCutoffHz =1.0f) |
void | OnBlockStart() |
void | OnBlockEnd() |
float | GetAvgCpuLoad() const |
float | GetMinCpuLoad() const |
float | GetMaxCpuLoad() const |
void | Reset() |
Public Functions Documentation¶
function CpuLoadMeter¶
function Init¶
inline void Init(
float sampleRateInHz,
int blockSizeInSamples,
float smoothingFilterCutoffHz =1.0f
)
Parameters:
- sampleRateInHz The sample rate in Hz
- blockSizeInSamples The block size in samples
- smoothingFilterCutoffHz The cutoff frequency of the smoothing filter that's used to create the average CPU load reading.
Initializes the CpuLoadMeter for a particular sample rate and block size.
function OnBlockStart¶
Call this at the beginning of your audio callback
function OnBlockEnd¶
Call this at the end of your audio callback
function GetAvgCpuLoad¶
Returns the smoothed average CPU load in the range 0..1
function GetMinCpuLoad¶
Returns the minimun CPU load observed since the last call to Reset().
function GetMaxCpuLoad¶
Returns the maximum CPU load observed since the last call to Reset().
function Reset¶
Resets the minimun, maximum and average load readings.
---¶
Updated on 2024-01-03 at 19:41:00 +0000