Hey all,
I'm currently trying to fix the reverb in Luppp and I'm running into a
rather strange bug:
I have an array of floats that is used to set the plugins parameters: its
called controlBuffer.
The following code connects the ports to the addresses of the float buffer.
The crazy thing is: The print outs before & after the connect ports are
different!
I don't understand how this is possible, but perhaps I'm missing something
LADSPA.
cout << "Decay: " << controlBuffer[4] << " Wet:
" << controlBuffer[8]
<< " Dry: " << controlBuffer[9]
<< " preDelay: " << controlBuffer[10] << "
highDamp " <<
controlBuffer[5] << endl;
descriptor -> connect_port ( pluginHandle , 0 , buffer );
descriptor -> connect_port ( pluginHandle , 1 , buffer );
descriptor -> connect_port ( pluginHandle , 2 , &outputBuffer[0] );
descriptor -> connect_port ( pluginHandle , 3 , &outputBufferR[0] );
descriptor -> connect_port ( pluginHandle , 4, &controlBuffer[4] );
descriptor -> connect_port ( pluginHandle , 5, &controlBuffer[5] );
descriptor -> connect_port ( pluginHandle , 6, &controlBuffer[6] );
descriptor -> connect_port ( pluginHandle , 7, &controlBuffer[7] );
descriptor -> connect_port ( pluginHandle , 8, &controlBuffer[8] );
descriptor -> connect_port ( pluginHandle , 9, &controlBuffer[9] );
descriptor -> connect_port ( pluginHandle ,10, &controlBuffer[10] );
descriptor -> connect_port ( pluginHandle ,11, &controlBuffer[11] );
descriptor -> connect_port ( pluginHandle ,12, &controlBuffer[12] );
cout << "Decay: " << controlBuffer[4] << " Wet:
" << controlBuffer[8]
<< " Dry: " << controlBuffer[9]
<< " preDelay: " << controlBuffer[10] << "
highDamp " <<
controlBuffer[5] << endl;
Example Output:
Decay: 4.7685 Wet: 0.70709 Dry: 0.696707 preDelay: 50 highDamp 0
Decay: 1.5 Wet: 0.25 Dry: 1 preDelay: 0 highDamp 5000
The problem is that the reverb plugin doesn't react to my input parameters,
but just processes based
on the 1.5, 0.25 wet, preDelay 0, and highDamp 5000 *all* the time, and
there's nothing I can do about it.
Am I doing something fundamentally wrong? I've tried connecting the ports
every process(), once, and then leave them.
I've hard coded values, it seems to make no difference.
These are the two relevant sources:
https://github.com/harryhaaren/Luppp/blob/master/src/ladspahost.hpp
https://github.com/harryhaaren/Luppp/blob/master/src/ladspahost.cpp
Help appreciated! -Harry