1 /* GStreamer ReplayGain analysis
3 * Copyright (C) 2006 Rene Stadler <mail@renestadler.de>
4 * Copyright (C) 2001 David Robinson <David@Robinson.org>
5 * Glen Sawyer <glensawyer@hotmail.com>
7 * rganalysis.h: Analyze raw audio data in accordance with ReplayGain
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 #ifndef __RG_ANALYSIS_H__
26 #define __RG_ANALYSIS_H__
32 #define RG_REFERENCE_LEVEL 89.
34 typedef struct _RgAnalysisCtx RgAnalysisCtx;
36 RgAnalysisCtx *rg_analysis_new (void);
37 gboolean rg_analysis_set_sample_rate (RgAnalysisCtx * ctx, gint sample_rate);
38 void rg_analysis_analyze_mono_float (RgAnalysisCtx * ctx, gconstpointer data,
39 gsize size, guint depth);
40 void rg_analysis_analyze_stereo_float (RgAnalysisCtx * ctx, gconstpointer data,
41 gsize size, guint depth);
42 void rg_analysis_analyze_mono_int16 (RgAnalysisCtx * ctx, gconstpointer data,
43 gsize size, guint depth);
44 void rg_analysis_analyze_stereo_int16 (RgAnalysisCtx * ctx, gconstpointer data,
45 gsize size, guint depth);
46 void rg_analysis_analyze (RgAnalysisCtx * ctx, const gfloat * samples_l,
47 const gfloat * samples_r, guint n_samples);
48 gboolean rg_analysis_track_result (RgAnalysisCtx * ctx, gdouble * gain,
50 gboolean rg_analysis_album_result (RgAnalysisCtx * ctx, gdouble * gain,
52 void rg_analysis_reset_album (RgAnalysisCtx * ctx);
53 void rg_analysis_reset (RgAnalysisCtx * ctx);
54 void rg_analysis_destroy (RgAnalysisCtx * ctx);
58 #endif /* __RG_ANALYSIS_H__ */