From 15e095092c9de9fbbe35bf726a7f1f873e2916b0 Mon Sep 17 00:00:00 2001 From: James Morris Date: Mon, 16 Jul 2012 01:07:18 -0700 Subject: [PATCH] Small fix for the ladspa plugin module to multiple the port hint by sample rate to give frequency ports the correct value range. --- mixer/src/Plugin_Module.C | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mixer/src/Plugin_Module.C b/mixer/src/Plugin_Module.C index 57f3bb9..aff05d8 100644 --- a/mixer/src/Plugin_Module.C +++ b/mixer/src/Plugin_Module.C @@ -461,11 +461,19 @@ Plugin_Module::load ( unsigned long id ) { p.hints.ranged = true; p.hints.minimum = _idata->descriptor->PortRangeHints[i].LowerBound; + if ( LADSPA_IS_HINT_SAMPLE_RATE(hd) ) + { + p.hints.minimum *= Engine::sample_rate(); + } } if ( LADSPA_IS_HINT_BOUNDED_ABOVE(hd) ) { p.hints.ranged = true; p.hints.maximum = _idata->descriptor->PortRangeHints[i].UpperBound; + if ( LADSPA_IS_HINT_SAMPLE_RATE(hd) ) + { + p.hints.maximum *= Engine::sample_rate(); + } } if ( LADSPA_IS_HINT_HAS_DEFAULT(hd) )