27 #ifndef GAVL_PEAKDETECTORS_H_INCLUDED
28 #define GAVL_PEAKDETECTORS_H_INCLUDED
30 #include <gavl/connectors.h>
67 double min,
double max,
double abs);
173 double * min,
double * max,
189 double * min,
double * max,
struct gavl_peak_detector_s gavl_peak_detector_t
Opaque structure for peak detector.
Definition: peakdetector.h:51
GAVL_PUBLIC gavl_audio_sink_t * gavl_peak_detector_get_sink(gavl_peak_detector_t *pd)
Get the audio sink.
GAVL_PUBLIC void gavl_peak_detector_get_peaks(gavl_peak_detector_t *pd, double *min, double *max, double *abs)
Get the peak volume for all channels separate.
void(* gavl_update_peak_callback)(void *priv, int samples, double min, double max, double abs)
Callback for getting the peaks across all channels.
Definition: peakdetector.h:65
GAVL_PUBLIC void gavl_peak_detector_set_format(gavl_peak_detector_t *pd, const gavl_audio_format_t *format)
Set format for a peak detector.
GAVL_PUBLIC void gavl_peak_detector_reset(gavl_peak_detector_t *pd)
Reset a peak detector.
GAVL_PUBLIC void gavl_peak_detector_set_callbacks(gavl_peak_detector_t *pd, gavl_update_peak_callback peak_callback, gavl_update_peaks_callback peaks_callback, void *priv)
Set callbacks.
GAVL_PUBLIC void gavl_peak_detector_update(gavl_peak_detector_t *pd, gavl_audio_frame_t *frame)
Feed the peak detector with a new frame.
void(* gavl_update_peaks_callback)(void *priv, int samples, const double *min, const double *max, const double *abs)
Callback for getting the peaks for all channels separately.
Definition: peakdetector.h:79
GAVL_PUBLIC void gavl_peak_detector_get_peak(gavl_peak_detector_t *pd, double *min, double *max, double *abs)
Get the peak volume across all channels.
GAVL_PUBLIC gavl_peak_detector_t * gavl_peak_detector_create()
Create peak detector.
GAVL_PUBLIC const gavl_audio_format_t * gavl_peak_detector_get_format(gavl_peak_detector_t *pd)
Get format.
GAVL_PUBLIC void gavl_peak_detector_destroy(gavl_peak_detector_t *pd)
Destroys a peak detector and frees all associated memory.
struct gavl_audio_sink_s gavl_audio_sink_t
Audio sink.
Definition: gavl.h:72
Generic container for audio samples.
Definition: gavl.h:668