Mixer: Don't forget to save and load controllers.

pull/3/head
Jonathan Moore Liles 2010-01-13 21:19:12 -06:00
parent d9315ee692
commit adf2d11b5b
2 changed files with 20 additions and 0 deletions

View File

@ -53,6 +53,7 @@
#include "JACK_Module.H"
#include "Gain_Module.H"
#include "Plugin_Module.H"
#include "Controller_Module.H"
#include <Fl/Fl_Box.H>
#include <FL/Fl_Menu.H>
@ -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

View File

@ -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;