1 #ifndef AUDIOGRAPHER_ROUTINES_H
2 #define AUDIOGRAPHER_ROUTINES_H
34 return (*_compute_peak) (data, samples, current_peak);
45 (*_apply_gain_to_buffer) (data, samples,
gain);
52 float abs = std::fabs(data[i]);
53 if (abs > current_peak) { current_peak = abs; }
#define LIBAUDIOGRAPHER_API
Allows overriding some routines with more efficient ones.
static void apply_gain_to_buffer(float *data, uint_type samples, float gain)
static float compute_peak(float const *data, uint_type samples, float current_peak)
static apply_gain_to_buffer_t _apply_gain_to_buffer
static float default_compute_peak(float const *data, uint_type samples, float current_peak)
static void override_compute_peak(compute_peak_t func)
static void override_apply_gain_to_buffer(apply_gain_to_buffer_t func)
static void default_apply_gain_to_buffer(float *data, uint_type samples, float gain)
static compute_peak_t _compute_peak
PBD::PropertyDescriptor< gain_t > gain
float(* compute_peak_t)(const ARDOUR::Sample *, pframes_t, float)
void(* apply_gain_to_buffer_t)(ARDOUR::Sample *, pframes_t, float)