~ubuntu-branches/ubuntu/hoary/flac/hoary

« back to all changes in this revision

Viewing changes to include/share/gain_analysis.h

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-04-16 15:14:31 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040416151431-eyloggqxpwbwpogz
Tags: 1.1.0-11
Ensure that libFLAC is linked with -lm on all architectures, and
regardless of whether nasm is present

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 (David@Robinson.org)
 
20
 *    -- blame him if you think the idea is flawed
 
21
 *  coding by Glen Sawyer (glensawyer@hotmail.com) 442 N 700 E, Provo, UT 84606 USA
 
22
 *    -- blame him if you think this runs too slowly, or the coding is otherwise flawed
 
23
 *  minor cosmetic tweaks to integrate with FLAC by Josh Coalson
 
24
 *
 
25
 *  For an explanation of the concepts and the basic algorithms involved, go to:
 
26
 *    http://www.replaygain.org/
 
27
 */
 
28
 
 
29
#ifndef GAIN_ANALYSIS_H
 
30
#define GAIN_ANALYSIS_H
 
31
 
 
32
#include <stddef.h>
 
33
 
 
34
#define GAIN_NOT_ENOUGH_SAMPLES  -24601
 
35
#define GAIN_ANALYSIS_ERROR           0
 
36
#define GAIN_ANALYSIS_OK              1
 
37
 
 
38
#define INIT_GAIN_ANALYSIS_ERROR      0
 
39
#define INIT_GAIN_ANALYSIS_OK         1
 
40
 
 
41
#ifdef __cplusplus
 
42
extern "C" {
 
43
#endif
 
44
 
 
45
typedef float   Float_t;         /* Type used for filtering */
 
46
 
 
47
int     InitGainAnalysis ( long samplefreq );
 
48
int     AnalyzeSamples   ( const Float_t* left_samples, const Float_t* right_samples, size_t num_samples, int num_channels );
 
49
int             ResetSampleFrequency ( long samplefreq );
 
50
Float_t   GetTitleGain     ( void );
 
51
Float_t   GetAlbumGain     ( void );
 
52
 
 
53
#ifdef __cplusplus
 
54
}
 
55
#endif
 
56
 
 
57
#endif /* GAIN_ANALYSIS_H */