Browse Source

Small fix for the ladspa plugin module to multiple the port hint by sample rate to give frequency ports the correct value range.

tags/non-daw-v1.2.0
James Morris Jonathan Moore Liles 13 years ago
parent
commit
15e095092c
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      mixer/src/Plugin_Module.C

+ 8
- 0
mixer/src/Plugin_Module.C View File

@@ -461,11 +461,19 @@ Plugin_Module::load ( unsigned long id )
{ {
p.hints.ranged = true; p.hints.ranged = true;
p.hints.minimum = _idata->descriptor->PortRangeHints[i].LowerBound; 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) ) if ( LADSPA_IS_HINT_BOUNDED_ABOVE(hd) )
{ {
p.hints.ranged = true; p.hints.ranged = true;
p.hints.maximum = _idata->descriptor->PortRangeHints[i].UpperBound; 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) ) if ( LADSPA_IS_HINT_HAS_DEFAULT(hd) )


Loading…
Cancel
Save