From f512c63017ab2184d7e9fb2410337047bb0b09ee Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Tue, 18 Feb 2014 23:01:40 +0100 Subject: [PATCH] LadspaEffect: fixed default value if hints are sample rate dependent When hints are sample rate dependent we also need to scale default value accordingly as well. Closes #334. --- plugins/ladspa_effect/LadspaEffect.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/ladspa_effect/LadspaEffect.cpp b/plugins/ladspa_effect/LadspaEffect.cpp index 08e087d7d..0ad2ec73e 100644 --- a/plugins/ladspa_effect/LadspaEffect.cpp +++ b/plugins/ladspa_effect/LadspaEffect.cpp @@ -418,6 +418,11 @@ void LadspaEffect::pluginInstantiation() p->def = 1.0f; } } + else if( manager->areHintsSampleRateDependent( m_key, port ) ) + { + p->def *= m_maxSampleRate; + } + p->max *= p->scale; p->min *= p->scale;