diff --git a/Mixer/Chain.C b/Mixer/Chain.C index 5023362..937b386 100644 --- a/Mixer/Chain.C +++ b/Mixer/Chain.C @@ -53,6 +53,7 @@ #include "JACK_Module.H" #include "Gain_Module.H" #include "Plugin_Module.H" +#include "Controller_Module.H" #include #include @@ -206,6 +207,13 @@ Chain::log_children ( void ) { module(i)->log_create(); } + + for ( int i = 0; i < controls_pack->children(); ++i ) + { + Controller_Module *cm = (Controller_Module*)controls_pack->child( i ); + + cm->log_create(); + } } /* Fill this chain with JACK I/O, Gain, and Meter modules. */ @@ -512,7 +520,13 @@ err: void Chain::add_control ( Module *m ) { + engine->lock(); + controls_pack->add( m ); + + engine->unlock(); + + controls_pack->redraw(); } void diff --git a/Mixer/Controller_Module.C b/Mixer/Controller_Module.C index 5bc0dc9..12a0482 100644 --- a/Mixer/Controller_Module.C +++ b/Mixer/Controller_Module.C @@ -82,7 +82,11 @@ Controller_Module::set ( Log_Entry &e ) } if ( port >= 0 && module ) + { control_output[0].connect_to( &module->control_input[port] ); + module->chain()->add_control( this ); + label( module->control_input[port].name() ); + } } @@ -290,6 +294,8 @@ Controller_Module::handle ( int m ) void Controller_Module::process ( void ) { + THREAD_ASSERT( RT ); + if ( control_output[0].connected() ) { float f = control_value;