From 1f5537b50ecb1793b7b1dcdb778e93a473b56c77 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Thu, 26 Jan 2017 04:15:57 +0100 Subject: [PATCH 1/3] swh - Dyson Compressor, fix NaN --- plugins/LadspaEffect/swh/dyson_compress_1403.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/LadspaEffect/swh/dyson_compress_1403.c b/plugins/LadspaEffect/swh/dyson_compress_1403.c index 25e0b7d64cc..27062f051a6 100644 --- a/plugins/LadspaEffect/swh/dyson_compress_1403.c +++ b/plugins/LadspaEffect/swh/dyson_compress_1403.c @@ -836,7 +836,7 @@ static void __attribute__((constructor)) swh_init() { D_("Release time (s)"); port_range_hints[DYSONCOMPRESS_RELEASE_TIME].HintDescriptor = LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_DEFAULT_LOW; - port_range_hints[DYSONCOMPRESS_RELEASE_TIME].LowerBound = 0; + port_range_hints[DYSONCOMPRESS_RELEASE_TIME].LowerBound = 0.0000001; port_range_hints[DYSONCOMPRESS_RELEASE_TIME].UpperBound = 1; /* Parameters for Fast compression ratio */ From fb48539ce7dcbad02c7d9983d35ed726b4116f71 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Wed, 1 Feb 2017 09:28:18 +0100 Subject: [PATCH 2/3] swh - shaper_1187, divide/0 --- plugins/LadspaEffect/swh/shaper_1187.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/LadspaEffect/swh/shaper_1187.c b/plugins/LadspaEffect/swh/shaper_1187.c index c1a52906bf7..7adfb3abdf8 100644 --- a/plugins/LadspaEffect/swh/shaper_1187.c +++ b/plugins/LadspaEffect/swh/shaper_1187.c @@ -115,8 +115,8 @@ static void runShaper(LADSPA_Handle instance, unsigned long sample_count) { if (shapep < 1.0f && shapep > -1.0f) { shape = 1.0f; - } else if (shape < 0) { - shape = -1.0f / shape; + } else if (shapep < 0) { + shape = -1.0f / shapep; } else { shape = shapep; } @@ -160,8 +160,8 @@ static void runAddingShaper(LADSPA_Handle instance, unsigned long sample_count) if (shapep < 1.0f && shapep > -1.0f) { shape = 1.0f; - } else if (shape < 0) { - shape = -1.0f / shape; + } else if (shapep < 0) { + shape = -1.0f / shapep; } else { shape = shapep; } From be5d11da025236b341a76952e4ed65b518117996 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Mon, 30 Oct 2017 10:34:40 +0100 Subject: [PATCH 3/3] Division with 0 in calf limiter --- plugins/LadspaEffect/calf/src/audio_fx.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/LadspaEffect/calf/src/audio_fx.cpp b/plugins/LadspaEffect/calf/src/audio_fx.cpp index f42ccc0a834..721a32ad571 100644 --- a/plugins/LadspaEffect/calf/src/audio_fx.cpp +++ b/plugins/LadspaEffect/calf/src/audio_fx.cpp @@ -731,6 +731,7 @@ void lookahead_limiter::process(float &left, float &right, float * multi_buffer) _peak = fabs(buffer[nextpos[j]]) > fabs(buffer[nextpos[j] + 1]) ? fabs(buffer[nextpos[j]]) : fabs(buffer[nextpos[j] + 1]); // calc a delta to use to reach our incoming peak from the // stored position + _peak = std::max( _peak, 0.000001f ); _delta = (_limit / peak - (limit * _multi_coeff * weight) / _peak) / (((buffer_size - nextpos[j] + pos) % buffer_size) / channels); if(_delta < nextdelta[j]) { // if the buffered delta is more important than the delta