Debian Codegraph @

external/lame/gain_analysis.h

raw symbols SCIP
1 /*
2 * ReplayGainAnalysis - analyzes input samples and give the recommended dB change
3 * Copyright (C) 2001 David Robinson and Glen Sawyer
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * concept and filter values by David Robinson ([email protected])
20 * -- blame him if you think the idea is flawed
21 * coding by Glen Sawyer ([email protected]) 735 W 255 N, Orem, UT 84057-4505 USA
22 * -- blame him if you think this runs too slowly, or the coding is otherwise flawed
23 *
24 * For an explanation of the concepts and the basic algorithms involved, go to:
25 * http://www.replaygain.org/
26 */
27
28 #ifndef GAIN_ANALYSIS_H
29 #define GAIN_ANALYSIS_Hcxx . . $ `external/lame/gain_analysis.h:29:9`!
30
31 #ifdef HAVE_INTTYPES_Hcxx . . $ `external/lame/lame__config.h:106:9`!
32 # include <inttypes.h>
33 #else
34 # ifdef HAVE_STDINT_H
35 # include <stdint.h>
36 # endif
37 #endif
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43
44 typedef sample_tcxx . . $ sample_t# Float_tcxx . . $ Float_t#; /* Type used for filtering */
45
46
47 #define PINK_REFcxx . . $ `external/lame/gain_analysis.h:47:9`! 64.82 /* 298640883795 */ /* calibration value for 89dB */
48
49
50 #define YULE_ORDERcxx . . $ `external/lame/gain_analysis.h:50:9`! 10
51 #define BUTTER_ORDERcxx . . $ `external/lame/gain_analysis.h:51:9`! 2
52 #define YULE_FILTERcxx . . $ `external/lame/gain_analysis.h:52:9`! filterYule
53 #define BUTTER_FILTERcxx . . $ `external/lame/gain_analysis.h:53:9`! filterButter
54 #define RMS_PERCENTILEcxx . . $ `external/lame/gain_analysis.h:54:9`! 0.95 /* percentile which is louder than the proposed level */
55 #define MAX_SAMP_FREQcxx . . $ `external/lame/gain_analysis.h:55:9`! 48000L /* maximum allowed sample frequency [Hz] */
56 #define RMS_WINDOW_TIME_NUMERATORcxx . . $ `external/lame/gain_analysis.h:56:9`! 1L
57 #define RMS_WINDOW_TIME_DENOMINATORcxx . . $ `external/lame/gain_analysis.h:57:9`! 20L /* numerator / denominator = time slice size [s] */
58 #define STEPS_per_dBcxx . . $ `external/lame/gain_analysis.h:58:9`! 100 /* Table entries per dB */
59 #define MAX_dBcxx . . $ `external/lame/gain_analysis.h:59:9`! 120 /* Table entries for 0...MAX_dB (normal max. values are 70...80 dB) */
60
61 enumcxx . . $ $anonymous_type_6ef91c48e0b056a_0# { GAIN_NOT_ENOUGH_SAMPLEScxx . . $ GAIN_NOT_ENOUGH_SAMPLES. = -24601, GAIN_ANALYSIS_ERRORcxx . . $ GAIN_ANALYSIS_ERROR. = 0, GAIN_ANALYSIS_OKcxx . . $ GAIN_ANALYSIS_OK. =
62 1, INIT_GAIN_ANALYSIS_ERRORcxx . . $ INIT_GAIN_ANALYSIS_ERROR. = 0, INIT_GAIN_ANALYSIS_OKcxx . . $ INIT_GAIN_ANALYSIS_OK. = 1
63 };
64
65 enumcxx . . $ $anonymous_type_6ef91c48e0b056a_1# { MAX_ORDERcxx . . $ MAX_ORDER. = (BUTTER_ORDERcxx . . $ `external/lame/gain_analysis.h:51:9`! > YULE_ORDERcxx . . $ `external/lame/gain_analysis.h:50:9`! ? BUTTER_ORDERcxx . . $ `external/lame/gain_analysis.h:51:9`! : YULE_ORDERcxx . . $ `external/lame/gain_analysis.h:50:9`!)
66 , MAX_SAMPLES_PER_WINDOWcxx . . $ MAX_SAMPLES_PER_WINDOW. = ((MAX_SAMP_FREQcxx . . $ `external/lame/gain_analysis.h:55:9`! * RMS_WINDOW_TIME_NUMERATORcxx . . $ `external/lame/gain_analysis.h:56:9`!) / RMS_WINDOW_TIME_DENOMINATORcxx . . $ `external/lame/gain_analysis.h:57:9`! + 1) /* max. Samples per Time slice */
67 };
68
69 struct replaygain_datacxx . . $ replaygain_data# {
70 Float_tcxx . . $ Float_t# linprebufcxx . . $ replaygain_data#linprebuf.[MAX_ORDERcxx . . $ MAX_ORDER. * 2];
71 Float_tcxx . . $ Float_t# *linprecxx . . $ replaygain_data#linpre.; /* left input samples, with pre-buffer */
72 Float_tcxx . . $ Float_t# lstepbufcxx . . $ replaygain_data#lstepbuf.[MAX_SAMPLES_PER_WINDOWcxx . . $ MAX_SAMPLES_PER_WINDOW. + MAX_ORDERcxx . . $ MAX_ORDER.];
73 Float_tcxx . . $ Float_t# *lstepcxx . . $ replaygain_data#lstep.; /* left "first step" (i.e. post first filter) samples */
74 Float_tcxx . . $ Float_t# loutbufcxx . . $ replaygain_data#loutbuf.[MAX_SAMPLES_PER_WINDOWcxx . . $ MAX_SAMPLES_PER_WINDOW. + MAX_ORDERcxx . . $ MAX_ORDER.];
75 Float_tcxx . . $ Float_t# *loutcxx . . $ replaygain_data#lout.; /* left "out" (i.e. post second filter) samples */
76 Float_tcxx . . $ Float_t# rinprebufcxx . . $ replaygain_data#rinprebuf.[MAX_ORDERcxx . . $ MAX_ORDER. * 2];
77 Float_tcxx . . $ Float_t# *rinprecxx . . $ replaygain_data#rinpre.; /* right input samples ... */
78 Float_tcxx . . $ Float_t# rstepbufcxx . . $ replaygain_data#rstepbuf.[MAX_SAMPLES_PER_WINDOWcxx . . $ MAX_SAMPLES_PER_WINDOW. + MAX_ORDERcxx . . $ MAX_ORDER.];
79 Float_tcxx . . $ Float_t# *rstepcxx . . $ replaygain_data#rstep.;
80 Float_tcxx . . $ Float_t# routbufcxx . . $ replaygain_data#routbuf.[MAX_SAMPLES_PER_WINDOWcxx . . $ MAX_SAMPLES_PER_WINDOW. + MAX_ORDERcxx . . $ MAX_ORDER.];
81 Float_tcxx . . $ Float_t# *routcxx . . $ replaygain_data#rout.;
82 long sampleWindowcxx . . $ replaygain_data#sampleWindow.; /* number of samples required to reach number of milliseconds required for RMS window */
83 long totsampcxx . . $ replaygain_data#totsamp.;
84 double lsumcxx . . $ replaygain_data#lsum.;
85 double rsumcxx . . $ replaygain_data#rsum.;
86 int freqindexcxx . . $ replaygain_data#freqindex.;
87 int firstcxx . . $ replaygain_data#first.;
88 uint32_tcxx . . $ uint32_t# Acxx . . $ replaygain_data#A.[STEPS_per_dBcxx . . $ `external/lame/gain_analysis.h:58:9`! * MAX_dBcxx . . $ `external/lame/gain_analysis.h:59:9`!];
89 uint32_tcxx . . $ uint32_t# Bcxx . . $ replaygain_data#B.[STEPS_per_dBcxx . . $ `external/lame/gain_analysis.h:58:9`! * MAX_dBcxx . . $ `external/lame/gain_analysis.h:59:9`!];
90
91 };
92 #ifndef replaygain_data_definedcxx . . $ `external/lame/util.h:110:9`!
93 #define replaygain_data_defined
94 typedef struct replaygain_data replaygain_t;
95 #endif
96
97
98
99
100 int InitGainAnalysiscxx . . $ InitGainAnalysis(a484823feb468863).(replaygain_tcxx . . $ replaygain_t# * rgData, long samplefreq);
101 int AnalyzeSamplescxx . . $ AnalyzeSamples(b9e75bfeaec731f0).(replaygain_tcxx . . $ replaygain_t# * rgData, const Float_tcxx . . $ Float_t# * left_samples,
102 const Float_tcxx . . $ Float_t# * right_samples, size_t num_samples, int num_channels);
103 Float_tcxx . . $ Float_t# GetTitleGaincxx . . $ GetTitleGain(55f8604f8dde2563).(replaygain_tcxx . . $ replaygain_t# * rgData);
104
105
106 #ifdef __cplusplus
107 }
108 #endif
109 #endif /* GAIN_ANALYSIS_H */