1 /*
2   This file is part of Deadbeef Player source code
3   http://deadbeef.sourceforge.net
4 
5   replaygain support
6 
7   Copyright (C) 2009-2013 Alexey Yakovenko
8 
9   This software is provided 'as-is', without any express or implied
10   warranty.  In no event will the authors be held liable for any damages
11   arising from the use of this software.
12 
13   Permission is granted to anyone to use this software for any purpose,
14   including commercial applications, and to alter it and redistribute it
15   freely, subject to the following restrictions:
16 
17   1. The origin of this software must not be misrepresented; you must not
18      claim that you wrote the original software. If you use this software
19      in a product, an acknowledgment in the product documentation would be
20      appreciated but is not required.
21   2. Altered source versions must be plainly marked as such, and must not be
22      misrepresented as being the original software.
23   3. This notice may not be removed or altered from any source distribution.
24 
25   Alexey Yakovenko waker@users.sourceforge.net
26 */
27 #ifndef __REPLAYGAIN_H
28 #define __REPLAYGAIN_H
29 
30 #include "deadbeef.h"
31 
32 void
33 replaygain_apply (ddb_waveformat_t *fmt, playItem_t *it, char *bytes, int bytesread);
34 
35 void
36 replaygain_set (int mode, int scale, float preamp, float global_preamp);
37 
38 void
39 replaygain_set_values (float albumgain, float albumpeak, float trackgain, float trackpeak);
40 
41 void
42 apply_replay_gain_int8 (playItem_t *it, char *bytes, int size);
43 
44 void
45 apply_replay_gain_int16 (playItem_t *it, char *bytes, int size);
46 
47 void
48 apply_replay_gain_int24 (playItem_t *it, char *bytes, int size);
49 
50 void
51 apply_replay_gain_int32 (playItem_t *it, char *bytes, int size);
52 
53 void
54 apply_replay_gain_float32 (playItem_t *it, char *bytes, int size);
55 
56 #endif
57