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

This commit is contained in:
James Morris 2012-07-16 01:07:18 -07:00 committed by Jonathan Moore Liles
parent c53cb2e7fe
commit 15e095092c
1 changed files with 8 additions and 0 deletions

View File

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