aboutsummaryrefslogtreecommitdiff
path: root/src/AudioCompress
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-04 10:34:12 +0100
committerAnton Khirnov <anton@khirnov.net>2020-03-19 13:48:47 +0100
commitadf870c1668b9d7de738b4915820459a152fc817 (patch)
tree4667df21eeedb6254144d0be5a97d24fbfc761c6 /src/AudioCompress
parentaa9dbb827555938adfb79acade4356cc0b83ca7f (diff)
tmp
Diffstat (limited to 'src/AudioCompress')
-rw-r--r--src/AudioCompress/compress.c2
-rw-r--r--src/AudioCompress/config.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/AudioCompress/compress.c b/src/AudioCompress/compress.c
index 36cdfd8d..9346eee6 100644
--- a/src/AudioCompress/compress.c
+++ b/src/AudioCompress/compress.c
@@ -124,6 +124,7 @@ void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
//! Determine target gain
newGain = (1 << 10)*prefs->target/peakVal;
+ fprintf(stderr, "peak %d gain %d\n", peakVal, newGain);
//! Adjust the gain with inertia from the previous gain value
newGain = (curGain*((1 << prefs->smooth) - 1) + newGain)
@@ -156,6 +157,7 @@ void Compressor_Process_int16(struct Compressor *obj, int16_t *audio,
ap = audio;
*clipped = 0;
+ fprintf(stderr, "count %u curgain %d newgain %d\n", count, curGain, newGain);
for (i = 0; i < count; i++)
{
int sample;
diff --git a/src/AudioCompress/config.h b/src/AudioCompress/config.h
index 25615ee6..a4b89e7d 100644
--- a/src/AudioCompress/config.h
+++ b/src/AudioCompress/config.h
@@ -9,11 +9,11 @@
#define ACVERSION "2.0"
/*** Default configuration stuff ***/
-#define TARGET 16384 /*!< Target level (on a scale of 0-32767) */
+#define TARGET 20000 /*!< Target level (on a scale of 0-32767) */
#define GAINMAX 32 /*!< The maximum amount to amplify by */
#define GAINSMOOTH 8 /*!< How much inertia ramping has*/
-#define BUCKETS 400 /*!< How long of a history to use by default */
+#define BUCKETS 40 /*!< How long of a history to use by default */
#endif