--- linuxsampler/trunk/src/effects/LadspaEffect.cpp 2011/06/11 17:53:32 2183 +++ linuxsampler/trunk/src/effects/LadspaEffect.cpp 2011/12/08 20:03:47 2296 @@ -280,6 +280,8 @@ vOutputChannels[i] = new AudioChannel(i, pDevice->MaxSamplesPerCycle()); } + // TODO: recalculate the min and max values that depends on sample rate + // assign (already created and initialized) control input and control // output variables (effect parameters) int iInControl = 0; @@ -313,7 +315,7 @@ ? pDescriptor->PortRangeHints[iPort].LowerBound : 0.0f; if (pDescriptor->PortRangeHints[iPort].HintDescriptor & LADSPA_HINT_SAMPLE_RATE) - low *= float(pDevice->SampleRate()); + low *= float(pDevice == NULL ? 44100 : pDevice->SampleRate()); return low; } @@ -325,7 +327,7 @@ ? pDescriptor->PortRangeHints[iPort].UpperBound : 1.0f; if (pDescriptor->PortRangeHints[iPort].HintDescriptor & LADSPA_HINT_SAMPLE_RATE) - up *= float(pDevice->SampleRate()); + up *= float(pDevice == NULL ? 44100 : pDevice->SampleRate()); return up; }