Initial revision 6759
[qball-mpd.git] / src / replayGain.h
blobc2d471464a276e4ce7e55908a56b512989b80eae
1 /* the Music Player Daemon (MPD)
2 * Copyright (C) 2003-2007 by Warren Dukes (warren.dukes@gmail.com)
3 * (c)2004 replayGain code by AliasMrJones
4 * This project's homepage is: http://www.musicpd.org
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef REPLAYGAIN_H
21 #define REPLAYGAIN_H
23 #include "audio.h"
25 #define REPLAYGAIN_OFF 0
26 #define REPLAYGAIN_TRACK 1
27 #define REPLAYGAIN_ALBUM 2
29 extern int replayGainState;
31 typedef struct _ReplayGainInfo {
32 float albumGain;
33 float albumPeak;
34 float trackGain;
35 float trackPeak;
37 /* used internally by mpd, to mess with it */
38 float scale;
39 } ReplayGainInfo;
41 ReplayGainInfo *newReplayGainInfo(void);
43 void freeReplayGainInfo(ReplayGainInfo * info);
45 void initReplayGainState(void);
47 void doReplayGain(ReplayGainInfo * info, char *buffer, int bufferSize,
48 AudioFormat * format);
50 #endif