2 * vgfilter.h (c) 2007,2008 William Poetra Yoga Hadisoeseno
4 * vgplay.h 1.0 (c) 2003 John Morton
7 /* vgplay.h 1.0 (c) 2003 John Morton
9 * Portions of this file are (C) COPYRIGHT 1994-2002 by
10 * the XIPHOPHORUS Company http://www.xiph.org/
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
16 * - Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
19 * - Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the
24 * - Neither the name of the Xiph.org Foundation nor the names of its
25 * contributors may be used to endorse or promote products derived
26 * from this software without specific prior written permission.
29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
30 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
32 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
33 * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
34 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
35 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
36 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
37 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
38 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
40 * OF THE POSSIBILITY OF SUCH DAMAGE.
42 **********************************************************************
44 * vgfilter - a filter for ov_read_filter to enable replay gain.
52 /* Default pre-amp in dB */
53 #define VG_PREAMP_DB 0.0
56 float scale_factor
; /* The scale factor */
57 float max_scale
; /* The maximum scale factor before clipping occurs */
61 /* Initializes the ReplayGain the vgain_state structure for a track. */
62 extern void vg_init(vgain_state
*vg_state
, vorbis_comment
*vc
);
64 /* The filter where VorbisGain is applied */
65 extern void vg_filter(float **pcm
, long channels
, long samples
, void *filter_param
);
67 #endif /* __VGPLAY_H */