Fix bug in plugin input configuration.

This commit is contained in:
Jonathan Moore Liles 2010-01-16 20:42:47 -06:00
parent 5248b90880
commit 5b8040b165
1 changed files with 39 additions and 35 deletions

View File

@ -229,12 +229,14 @@ Plugin_Module::can_support_inputs ( int n )
bool bool
Plugin_Module::configure_inputs( int n ) Plugin_Module::configure_inputs( int n )
{ {
if ( ninputs() == n ) int inst = _idata->handle.size();
return true;
int inst = 1; if ( ninputs() != n )
{
_crosswire = false; _crosswire = false;
if ( n != ninputs() )
{
if ( 1 == n && plugin_ins() > 1 ) if ( 1 == n && plugin_ins() > 1 )
{ {
DMESSAGE( "Cross-wiring plugin inputs" ); DMESSAGE( "Cross-wiring plugin inputs" );
@ -261,15 +263,17 @@ Plugin_Module::configure_inputs( int n )
inst = n; inst = n;
} }
if ( n == plugin_ins() ) else if ( n == plugin_ins() )
{ {
DMESSAGE( "Plugin input configuration is a perfect match" );
} }
else else
{ {
// unsupported configuration DMESSAGE( "Unsupported input configuration" );
return false; return false;
} }
}
}
if ( _active ) if ( _active )
deactivate(); deactivate();