]> 4ch.mooo.com Git - 16.git/blob - src/lib/dl/ext/flac/share/replaygain_analysis.h
refresh wwww
[16.git] / src / lib / dl / ext / flac / share / replaygain_analysis.h
1 /*\r
2  *  ReplayGainAnalysis - analyzes input samples and give the recommended dB change\r
3  *  Copyright (C) 2001 David Robinson and Glen Sawyer\r
4  *\r
5  *  This library is free software; you can redistribute it and/or\r
6  *  modify it under the terms of the GNU Lesser General Public\r
7  *  License as published by the Free Software Foundation; either\r
8  *  version 2.1 of the License, or (at your option) any later version.\r
9  *\r
10  *  This library is distributed in the hope that it will be useful,\r
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
13  *  Lesser General Public License for more details.\r
14  *\r
15  *  You should have received a copy of the GNU Lesser General Public\r
16  *  License along with this library; if not, write to the Free Software\r
17  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
18  *\r
19  *  concept and filter values by David Robinson (David@Robinson.org)\r
20  *    -- blame him if you think the idea is flawed\r
21  *  coding by Glen Sawyer (glensawyer@hotmail.com) 442 N 700 E, Provo, UT 84606 USA\r
22  *    -- blame him if you think this runs too slowly, or the coding is otherwise flawed\r
23  *  minor cosmetic tweaks to integrate with FLAC by Josh Coalson\r
24  *\r
25  *  For an explanation of the concepts and the basic algorithms involved, go to:\r
26  *    http://www.replaygain.org/\r
27  */\r
28 \r
29 #ifndef GAIN_ANALYSIS_H\r
30 #define GAIN_ANALYSIS_H\r
31 \r
32 #include <stddef.h>\r
33 \r
34 #define GAIN_NOT_ENOUGH_SAMPLES  -24601\r
35 #define GAIN_ANALYSIS_ERROR           0\r
36 #define GAIN_ANALYSIS_OK              1\r
37 \r
38 #define INIT_GAIN_ANALYSIS_ERROR      0\r
39 #define INIT_GAIN_ANALYSIS_OK         1\r
40 \r
41 #ifdef __cplusplus\r
42 extern "C" {\r
43 #endif\r
44 \r
45 typedef float   Float_t;         /* Type used for filtering */\r
46 \r
47 extern Float_t ReplayGainReferenceLoudness; /* in dB SPL, currently == 89.0 */\r
48 \r
49 int     InitGainAnalysis ( long samplefreq );\r
50 int     AnalyzeSamples   ( const Float_t* left_samples, const Float_t* right_samples, size_t num_samples, int num_channels );\r
51 int             ResetSampleFrequency ( long samplefreq );\r
52 Float_t GetTitleGain     ( void );\r
53 Float_t GetAlbumGain     ( void );\r
54 \r
55 #ifdef __cplusplus\r
56 }\r
57 #endif\r
58 \r
59 #endif /* GAIN_ANALYSIS_H */\r