Mixer: Fix plugin bypass and plugin insertion broken by 8b9ef85
.
This commit is contained in:
parent
70e0db1c47
commit
63c4f68b3b
|
@ -351,8 +351,8 @@ public:
|
||||||
return control_output.size();
|
return control_output.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bypass ( void ) const { return _bypass; }
|
virtual bool bypass ( void ) const { return _bypass; }
|
||||||
void bypass ( bool v ) { _bypass = v; redraw(); }
|
virtual void bypass ( bool v ) { _bypass = v; redraw(); }
|
||||||
|
|
||||||
int control_input_port_index ( Port *p )
|
int control_input_port_index ( Port *p )
|
||||||
{
|
{
|
||||||
|
|
|
@ -669,10 +669,13 @@ Plugin_Module::set_output_buffer ( int n, void *buf )
|
||||||
void
|
void
|
||||||
Plugin_Module::activate ( void )
|
Plugin_Module::activate ( void )
|
||||||
{
|
{
|
||||||
|
DMESSAGE( "Activating plugin \"%s\"", label() );
|
||||||
|
|
||||||
if ( _active )
|
if ( _active )
|
||||||
FATAL( "Attempt to activate already active plugin" );
|
FATAL( "Attempt to activate already active plugin" );
|
||||||
|
|
||||||
chain()->engine()->lock();
|
if ( chain() )
|
||||||
|
chain()->engine()->lock();
|
||||||
|
|
||||||
if ( _idata->descriptor->activate )
|
if ( _idata->descriptor->activate )
|
||||||
for ( unsigned int i = 0; i < _idata->handle.size(); ++i )
|
for ( unsigned int i = 0; i < _idata->handle.size(); ++i )
|
||||||
|
@ -680,13 +683,17 @@ Plugin_Module::activate ( void )
|
||||||
|
|
||||||
_active = true;
|
_active = true;
|
||||||
|
|
||||||
chain()->engine()->unlock();
|
if ( chain() )
|
||||||
|
chain()->engine()->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Plugin_Module::deactivate( void )
|
Plugin_Module::deactivate( void )
|
||||||
{
|
{
|
||||||
chain()->engine()->lock();
|
DMESSAGE( "Deactivating plugin \"%s\"", label() );
|
||||||
|
|
||||||
|
if ( chain() )
|
||||||
|
chain()->engine()->lock();
|
||||||
|
|
||||||
_active = false;
|
_active = false;
|
||||||
|
|
||||||
|
@ -694,7 +701,8 @@ Plugin_Module::deactivate( void )
|
||||||
for ( unsigned int i = 0; i < _idata->handle.size(); ++i )
|
for ( unsigned int i = 0; i < _idata->handle.size(); ++i )
|
||||||
_idata->descriptor->deactivate( _idata->handle[i] );
|
_idata->descriptor->deactivate( _idata->handle[i] );
|
||||||
|
|
||||||
chain()->engine()->unlock();
|
if ( chain() )
|
||||||
|
chain()->engine()->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -66,7 +66,7 @@ private:
|
||||||
|
|
||||||
ImplementationData *_idata;
|
ImplementationData *_idata;
|
||||||
|
|
||||||
bool _active;
|
volatile bool _active;
|
||||||
int _plugin_ins;
|
int _plugin_ins;
|
||||||
int _plugin_outs;
|
int _plugin_outs;
|
||||||
bool _crosswire;
|
bool _crosswire;
|
||||||
|
|
Loading…
Reference in New Issue