annotate src/flac-1.2.1/include/share/replaygain_analysis.h @ 83:ae30d91d2ffe

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