X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=compress_filter.c;h=15bed6dfa33c896421ab17a89ec426669cf4b025;hp=0c76fd785123a83bd1b7fb660ecb6157da2a47eb;hb=99f21f0b6ecf29f949cdbce285e241a2e3ef3093;hpb=e0441a354b25f6fdd97480fe4e1f4f942347611f diff --git a/compress_filter.c b/compress_filter.c index 0c76fd78..15bed6df 100644 --- a/compress_filter.c +++ b/compress_filter.c @@ -123,7 +123,7 @@ static void compress_open(struct filter_node *fn) fn->private_data = pcd; fn->min_iqs = 2; /* 16 bit audio */ pcd->current_gain = 1U << inertia; - pcd->max_gain = 1U << (inertia + aggressiveness); + pcd->max_gain = (1U << inertia) * (1.0 + 3.0 * aggressiveness / 10.0); } static void *compress_setup(const struct lls_parse_result *lpr) @@ -136,20 +136,15 @@ static void *compress_setup(const struct lls_parse_result *lpr) exit(EXIT_FAILURE); } val = U32_OPTVAL(AGGRESSIVENESS, lpr); - if (val == 0 || val > 15) { + if (val > 10) { PARA_EMERG_LOG("aggressiveness (%u) out of range\n", val); exit(EXIT_FAILURE); } val = U32_OPTVAL(INERTIA, lpr); - if (val == 0 || val > 15) { + if (val == 0 || val > 14) { PARA_EMERG_LOG("inertia (%u) out of range\n", val); exit(EXIT_FAILURE); } - val = U32_OPTVAL(AGGRESSIVENESS, lpr) + U32_OPTVAL(INERTIA, lpr); - if (val > 16) { - PARA_EMERG_LOG("inertia + aggressiveness (%u) > 16\n", val); - exit(EXIT_FAILURE); - } val = U32_OPTVAL(TARGET_LEVEL, lpr); if (val > 32767) { PARA_EMERG_LOG("target-level (%u) out of range\n", val);