Browse Source

Mixer/Plugin_Module: Fix detection of INTEGER hint when default 1 hint is specified.

tags/non-daw-v1.2.0
Jonathan Moore Liles 10 years ago
parent
commit
2545510006
1 changed files with 12 additions and 11 deletions
  1. +12
    -11
      mixer/src/Plugin_Module.C

+ 12
- 11
mixer/src/Plugin_Module.C View File

@@ -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


Loading…
Cancel
Save