Skip to content

Class daisy::CpuLoadMeter

ClassList > daisy > CpuLoadMeter

Public Functions

Type Name
CpuLoadMeter ()
float GetAvgCpuLoad () const
float GetMaxCpuLoad () const
float GetMinCpuLoad () const
void Init (float sampleRateInHz, int blockSizeInSamples, float smoothingFilterCutoffHz=1.0f)
void OnBlockEnd ()
void OnBlockStart ()
void Reset ()

Public Functions Documentation

function CpuLoadMeter [½]

inline daisy::CpuLoadMeter::CpuLoadMeter () 

function GetAvgCpuLoad

inline float daisy::CpuLoadMeter::GetAvgCpuLoad () const

Returns the smoothed average CPU load in the range 0..1


function GetMaxCpuLoad

inline float daisy::CpuLoadMeter::GetMaxCpuLoad () const

Returns the maximum CPU load observed since the last call to Reset().


function GetMinCpuLoad

inline float daisy::CpuLoadMeter::GetMinCpuLoad () const

Returns the minimun CPU load observed since the last call to Reset().


function Init

inline void daisy::CpuLoadMeter::Init (
    float sampleRateInHz,
    int blockSizeInSamples,
    float smoothingFilterCutoffHz=1.0f
) 

Initializes the CpuLoadMeter for a particular sample rate and block size.

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.

function OnBlockEnd

inline void daisy::CpuLoadMeter::OnBlockEnd () 

Call this at the end of your audio callback


function OnBlockStart

inline void daisy::CpuLoadMeter::OnBlockStart () 

Call this at the beginning of your audio callback


function Reset

inline void daisy::CpuLoadMeter::Reset () 

Resets the minimun, maximum and average load readings.



The documentation for this class was generated from the following file external-docs/libDaisy/src/util/CpuLoadMeter.h