From 25455100062ab6907736031a7b6a9aca5fa8eb78 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Fri, 23 Aug 2013 17:04:47 -0700 Subject: [PATCH] Mixer/Plugin_Module: Fix detection of INTEGER hint when default 1 hint is specified. --- mixer/src/Plugin_Module.C | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/mixer/src/Plugin_Module.C b/mixer/src/Plugin_Module.C index 2dca6e7..ab52daa 100644 --- a/mixer/src/Plugin_Module.C +++ b/mixer/src/Plugin_Module.C @@ -580,18 +580,19 @@ Plugin_Module::load ( unsigned long id ) if (LADSPA_IS_HINT_SAMPLE_RATE(HintDesc)) { Default *= sample_rate(); } - if (LADSPA_IS_HINT_INTEGER(HintDesc)) { - if ( p.hints.ranged && - 0 == p.hints.minimum && - 1 == p.hints.maximum ) - p.hints.type = Port::Hints::BOOLEAN; - else - p.hints.type = Port::Hints::INTEGER; - Default = floorf(Default); - } - if (LADSPA_IS_HINT_TOGGLED(HintDesc)){ + } + + if (LADSPA_IS_HINT_INTEGER(HintDesc)) { + if ( p.hints.ranged && + 0 == p.hints.minimum && + 1 == p.hints.maximum ) p.hints.type = Port::Hints::BOOLEAN; - } + else + p.hints.type = Port::Hints::INTEGER; + Default = floorf(Default); + } + if (LADSPA_IS_HINT_TOGGLED(HintDesc)){ + p.hints.type = Port::Hints::BOOLEAN; } } #else