00001 /* 00002 * Copyright (C) 2003-2009 The Music Player Daemon Project 00003 * http://www.musicpd.org 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 00020 /* 00021 * Imported from AudioCompress by J. Shagam <fluffy@beesbuzz.biz> 00022 */ 00023 00024 #ifndef MPD_COMPRESS_H 00025 #define MPD_COMPRESS_H 00026 00027 /* These are copied from the AudioCompress config.h, mainly because CompressDo 00028 * needs GAINSHIFT defined. The rest are here so they can be used as defaults 00029 * to pass to CompressCfg(). -- jat */ 00030 #define ANTICLIP 0 /* Strict clipping protection */ 00031 #define TARGET 25000 /* Target level */ 00032 #define GAINMAX 32 /* The maximum amount to amplify by */ 00033 #define GAINSHIFT 10 /* How fine-grained the gain is */ 00034 #define GAINSMOOTH 8 /* How much inertia ramping has*/ 00035 #define BUCKETS 400 /* How long of a history to store */ 00036 00037 void CompressCfg(int monitor, 00038 int anticlip, 00039 int target, 00040 int maxgain, 00041 int smooth, 00042 unsigned buckets); 00043 00044 void CompressDo(void *data, unsigned int numSamples); 00045 00046 void CompressFree(void); 00047 00048 #endif