Ardour  9.0-pre0-582-g084a23a80d
ARDOUR::DSPLoadCalculator Class Reference

#include <dsp_load_calculator.h>

Public Member Functions

 DSPLoadCalculator ()
 
void reset ()
 
void set_max_time (double samplerate, uint32_t period_size)
 
void set_max_time_us (uint64_t max_time_us)
 
int64_t get_max_time_us () const
 
void set_start_timestamp_us (int64_t start_timestamp_us)
 
void set_stop_timestamp_us (int64_t stop_timestamp_us)
 
int64_t elapsed_time_us ()
 
float get_dsp_load () const
 
float get_dsp_load_unbound () const
 
int64_t max_timer_error_us ()
 

Private Attributes

bool m_calc_avg_load
 
int64_t m_max_time_us
 
int64_t m_start_timestamp_us
 
int64_t m_stop_timestamp_us
 
float m_alpha
 
float m_dsp_load
 

Detailed Description

Definition at line 31 of file dsp_load_calculator.h.

Constructor & Destructor Documentation

◆ DSPLoadCalculator()

ARDOUR::DSPLoadCalculator::DSPLoadCalculator ( )
inline

Definition at line 33 of file dsp_load_calculator.h.

Member Function Documentation

◆ elapsed_time_us()

int64_t ARDOUR::DSPLoadCalculator::elapsed_time_us ( )
inline

Definition at line 92 of file dsp_load_calculator.h.

◆ get_dsp_load()

float ARDOUR::DSPLoadCalculator::get_dsp_load ( ) const
inline
Returns
a decimal value between 0.0 and 1.0 representing the percentage of time spent between start and stop in proportion to the max expected time in microseconds(us).

Definition at line 102 of file dsp_load_calculator.h.

◆ get_dsp_load_unbound()

float ARDOUR::DSPLoadCalculator::get_dsp_load_unbound ( ) const
inline
Returns
an unbound value representing the percentage of time spent between start and stop in proportion to the max expected time in microseconds(us). This is useful for cases to estimate overload (e.g. Dummy backend)

Definition at line 113 of file dsp_load_calculator.h.

◆ get_max_time_us()

int64_t ARDOUR::DSPLoadCalculator::get_max_time_us ( ) const
inline

Definition at line 60 of file dsp_load_calculator.h.

◆ max_timer_error_us()

int64_t ARDOUR::DSPLoadCalculator::max_timer_error_us ( )
inline

The maximum error in timestamp values that will be tolerated before the current dsp load sample will be ignored

Definition at line 123 of file dsp_load_calculator.h.

◆ reset()

void ARDOUR::DSPLoadCalculator::reset ( )
inline

Definition at line 43 of file dsp_load_calculator.h.

◆ set_max_time()

void ARDOUR::DSPLoadCalculator::set_max_time ( double  samplerate,
uint32_t  period_size 
)
inline

Definition at line 49 of file dsp_load_calculator.h.

◆ set_max_time_us()

void ARDOUR::DSPLoadCalculator::set_max_time_us ( uint64_t  max_time_us)
inline

Definition at line 54 of file dsp_load_calculator.h.

◆ set_start_timestamp_us()

void ARDOUR::DSPLoadCalculator::set_start_timestamp_us ( int64_t  start_timestamp_us)
inline

Definition at line 62 of file dsp_load_calculator.h.

◆ set_stop_timestamp_us()

void ARDOUR::DSPLoadCalculator::set_stop_timestamp_us ( int64_t  stop_timestamp_us)
inline

Definition at line 66 of file dsp_load_calculator.h.

Member Data Documentation

◆ m_alpha

float ARDOUR::DSPLoadCalculator::m_alpha
private

Definition at line 130 of file dsp_load_calculator.h.

◆ m_calc_avg_load

bool ARDOUR::DSPLoadCalculator::m_calc_avg_load
private

Definition at line 126 of file dsp_load_calculator.h.

◆ m_dsp_load

float ARDOUR::DSPLoadCalculator::m_dsp_load
private

Definition at line 131 of file dsp_load_calculator.h.

◆ m_max_time_us

int64_t ARDOUR::DSPLoadCalculator::m_max_time_us
private

Definition at line 127 of file dsp_load_calculator.h.

◆ m_start_timestamp_us

int64_t ARDOUR::DSPLoadCalculator::m_start_timestamp_us
private

Definition at line 128 of file dsp_load_calculator.h.

◆ m_stop_timestamp_us

int64_t ARDOUR::DSPLoadCalculator::m_stop_timestamp_us
private

Definition at line 129 of file dsp_load_calculator.h.


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