gavl
peakdetector.h
Go to the documentation of this file.
1 /*****************************************************************
2  * gavl - a general purpose audio/video processing library
3  *
4  * Copyright (c) 2001 - 2012 Members of the Gmerlin project
5  * gmerlin-general@lists.sourceforge.net
6  * http://gmerlin.sourceforge.net
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  * *****************************************************************/
21 
27 #ifndef GAVL_PEAKDETECTORS_H_INCLUDED
28 #define GAVL_PEAKDETECTORS_H_INCLUDED
29 
30 #include <gavl/connectors.h>
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
51 typedef struct gavl_peak_detector_s gavl_peak_detector_t;
52 
53 /* Create / destroy */
54 
65 typedef void (*gavl_update_peak_callback)(void * priv,
66  int samples,
67  double min, double max, double abs);
68 
79 typedef void (*gavl_update_peaks_callback)(void * priv,
80  int samples,
81  const double * min,
82  const double * max,
83  const double * abs);
84 
89 GAVL_PUBLIC
91 
101 GAVL_PUBLIC
103  gavl_update_peak_callback peak_callback,
104  gavl_update_peaks_callback peaks_callback,
105  void * priv);
106 
107 
112 GAVL_PUBLIC
114 
123 GAVL_PUBLIC
125  const gavl_audio_format_t * format);
126 
134 GAVL_PUBLIC const gavl_audio_format_t *
136 
137 
143 GAVL_PUBLIC
145  gavl_audio_frame_t * frame);
146 
157 GAVL_PUBLIC
159 
171 GAVL_PUBLIC
173  double * min, double * max,
174  double * abs);
175 
187 GAVL_PUBLIC
189  double * min, double * max,
190  double * abs);
191 
196 GAVL_PUBLIC
198 
205 #ifdef __cplusplus
206 }
207 #endif
208 
209 #endif // GAVL_PEAKDETECTORS_H_INCLUDED