Ardour  9.0-pre0-582-g084a23a80d
AudioGrapher::Routines Class Reference

Allows overriding some routines with more efficient ones. More...

#include <routines.h>

Public Types

typedef uint32_t uint_type
 
typedef float(* compute_peak_t) (float const *, uint_type, float)
 
typedef void(* apply_gain_to_buffer_t) (float *, uint_type, float)
 

Static Public Member Functions

static void override_compute_peak (compute_peak_t func)
 
static void override_apply_gain_to_buffer (apply_gain_to_buffer_t func)
 
static float compute_peak (float const *data, uint_type samples, float current_peak)
 
static void apply_gain_to_buffer (float *data, uint_type samples, float gain)
 

Static Private Member Functions

static float default_compute_peak (float const *data, uint_type samples, float current_peak)
 
static void default_apply_gain_to_buffer (float *data, uint_type samples, float gain)
 

Static Private Attributes

static compute_peak_t _compute_peak
 
static apply_gain_to_buffer_t _apply_gain_to_buffer
 

Detailed Description

Allows overriding some routines with more efficient ones.

Definition at line 14 of file routines.h.

Member Typedef Documentation

◆ apply_gain_to_buffer_t

typedef void(* AudioGrapher::Routines::apply_gain_to_buffer_t) (float *, uint_type, float)

Definition at line 20 of file routines.h.

◆ compute_peak_t

typedef float(* AudioGrapher::Routines::compute_peak_t) (float const *, uint_type, float)

Definition at line 19 of file routines.h.

◆ uint_type

Definition at line 17 of file routines.h.

Member Function Documentation

◆ apply_gain_to_buffer()

static void AudioGrapher::Routines::apply_gain_to_buffer ( float *  data,
uint_type  samples,
float  gain 
)
inlinestatic

Applies constant gain to buffer
RT safe

Parameters
datadata to which the gain is applied
sampleslength of data
gaingain that is applied

Definition at line 43 of file routines.h.

◆ compute_peak()

static float AudioGrapher::Routines::compute_peak ( float const *  data,
uint_type  samples,
float  current_peak 
)
inlinestatic

Computes peak in float buffer
RT safe

Parameters
databuffer from which the peak is computed
sampleslength of the portion of buffer that is checked
current_peakcurrent peak of buffer, if calculated in several passes
Returns
maximum of values in [data, data + samples) and current_peak

Definition at line 32 of file routines.h.

◆ default_apply_gain_to_buffer()

static void AudioGrapher::Routines::default_apply_gain_to_buffer ( float *  data,
uint_type  samples,
float  gain 
)
inlinestaticprivate

Definition at line 58 of file routines.h.

◆ default_compute_peak()

static float AudioGrapher::Routines::default_compute_peak ( float const *  data,
uint_type  samples,
float  current_peak 
)
inlinestaticprivate

Definition at line 49 of file routines.h.

◆ override_apply_gain_to_buffer()

static void AudioGrapher::Routines::override_apply_gain_to_buffer ( apply_gain_to_buffer_t  func)
inlinestatic

Definition at line 23 of file routines.h.

◆ override_compute_peak()

static void AudioGrapher::Routines::override_compute_peak ( compute_peak_t  func)
inlinestatic

Definition at line 22 of file routines.h.

Member Data Documentation

◆ _apply_gain_to_buffer

apply_gain_to_buffer_t AudioGrapher::Routines::_apply_gain_to_buffer
staticprivate

Definition at line 66 of file routines.h.

◆ _compute_peak

compute_peak_t AudioGrapher::Routines::_compute_peak
staticprivate

Definition at line 65 of file routines.h.


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