Use AudioCompress for volume normalization

git-svn-id: https://svn.musicpd.org/mpd/trunk@4474 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman
2006-07-27 00:50:59 +00:00
parent bf5336cebd
commit 22b16884a2
10 changed files with 463 additions and 100 deletions

29
src/compress.h Normal file
View File

@@ -0,0 +1,29 @@
/* compress.h
** interface to audio compression
*/
#ifndef COMPRESS_H
#define COMPRESS_H
/* These are copied from the AudioCompress config.h, mainly because CompressDo
* needs GAINSHIFT defined. The rest are here so they can be used as defaults
* to pass to CompressCfg. */
#define ANTICLIP 0 /* Strict clipping protection */
#define TARGET 25000 /* Target level */
#define GAINMAX 32 /* The maximum amount to amplify by */
#define GAINSHIFT 10 /* How fine-grained the gain is */
#define GAINSMOOTH 8 /* How much inertia ramping has*/
#define BUCKETS 400 /* How long of a history to store */
void CompressCfg(int monitor,
int anticlip,
int target,
int maxgain,
int smooth,
int buckets);
void CompressDo(void *data, unsigned int numSamples);
void CompressFree(void);
#endif