diff options
author | J. Shagam <fluffy@beesbuzz.biz> | 2009-12-02 18:11:53 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-02 18:11:53 +0100 |
commit | 4076523198655b1b459c8014c0ff8de76d720703 (patch) | |
tree | 6a46f769caf550cd20b25f70c6eaefa2be7198a0 /src/AudioCompress/compress.h | |
parent | 3857bb99909a3b2816c86f19d3bc3776ab7c8f4f (diff) | |
download | mpd-4076523198655b1b459c8014c0ff8de76d720703.tar.gz mpd-4076523198655b1b459c8014c0ff8de76d720703.tar.xz mpd-4076523198655b1b459c8014c0ff8de76d720703.zip |
compress: upgraded to AudioCompress 2.0
Copied sources from
http://beesbuzz.biz/code/audiocompress/AudioCompress-2.0.tar.gz
[mk: created this patch under fluffy's name and fixed some gcc
signed/unsigned comparison warnings]
Diffstat (limited to '')
-rw-r--r-- | src/AudioCompress/compress.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/AudioCompress/compress.h b/src/AudioCompress/compress.h new file mode 100644 index 000000000..cc875c6da --- /dev/null +++ b/src/AudioCompress/compress.h @@ -0,0 +1,40 @@ +/*! compress.h + * interface to audio compression + * + * (c)2007 busybee (http://beesbuzz.biz/) + * Licensed under the terms of the LGPL. See the file COPYING for details. + */ + +#ifndef COMPRESS_H +#define COMPRESS_H + +#include <sys/types.h> + +//! Configuration values for the compressor object +struct CompressorConfig { + int target; + int maxgain; + int smooth; +}; + +struct Compressor; + +//! Create a new compressor (use history value of 0 for default) +struct Compressor *Compressor_new(unsigned int history); + +//! Delete a compressor +void Compressor_delete(struct Compressor *); + +//! Set the history length +void Compressor_setHistory(struct Compressor *, unsigned int history); + +//! Get the configuration for a compressor +struct CompressorConfig *Compressor_getConfig(struct Compressor *); + +//! Process 16-bit signed data +void Compressor_Process_int16(struct Compressor *, int16_t *data, unsigned int count); + +//! TODO: Compressor_Process_int32, Compressor_Process_float, others as needed + +//! TODO: functions for getting at the peak/gain/clip history buffers (for monitoring) +#endif |