Browse Source

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

tags/non-daw-v1.1.0
Jonathan Moore Liles 15 years ago
parent
commit
adf2d11b5b
2 changed files with 20 additions and 0 deletions
  1. +14
    -0
      Mixer/Chain.C
  2. +6
    -0
      Mixer/Controller_Module.C

+ 14
- 0
Mixer/Chain.C 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


+ 6
- 0
Mixer/Controller_Module.C 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;


Loading…
Cancel
Save