Cleanup.
This commit is contained in:
parent
d0af570a36
commit
0042d8e531
|
@ -46,6 +46,8 @@
|
|||
* optimized out.
|
||||
*/
|
||||
|
||||
#include "const.h"
|
||||
|
||||
#include "Chain.H"
|
||||
|
||||
#include "Module.H"
|
||||
|
@ -77,12 +79,6 @@
|
|||
|
||||
#include <FL/Fl_Flip_Button.H>
|
||||
|
||||
#include "const.h"
|
||||
|
||||
|
||||
|
||||
std::list <Chain*> Chain::chain;
|
||||
|
||||
|
||||
|
||||
void
|
||||
|
@ -190,8 +186,6 @@ Chain::Chain ( ) : Fl_Group( 0, 0, 100, 100, "")
|
|||
|
||||
end();
|
||||
|
||||
chain.push_back( this );
|
||||
|
||||
log_create();
|
||||
}
|
||||
|
||||
|
@ -199,10 +193,10 @@ Chain::~Chain ( )
|
|||
{
|
||||
DMESSAGE( "Destroying chain" );
|
||||
|
||||
chain.remove( this );
|
||||
|
||||
log_destroy();
|
||||
|
||||
engine()->lock();
|
||||
|
||||
/* if we leave this up to FLTK, it will happen after we've
|
||||
already destroyed the engine */
|
||||
modules_pack->clear();
|
||||
|
@ -266,7 +260,7 @@ Chain::initialize_with_default ( void )
|
|||
|
||||
|
||||
void Chain::cb_handle(Fl_Widget* o) {
|
||||
if ( o = tab_button )
|
||||
if ( o == tab_button )
|
||||
{
|
||||
Fl_Flip_Button *fb = (Fl_Flip_Button*)o;
|
||||
|
||||
|
@ -326,7 +320,6 @@ Chain::remove ( Module *m )
|
|||
void
|
||||
Chain::configure_ports ( void )
|
||||
{
|
||||
/* int old_outs = outs(); */
|
||||
int nouts = 0;
|
||||
|
||||
engine()->lock();
|
||||
|
@ -337,15 +330,7 @@ Chain::configure_ports ( void )
|
|||
nouts = module( i )->noutputs();
|
||||
}
|
||||
|
||||
/* outs( nouts ); */
|
||||
|
||||
int req_buffers = required_buffers();
|
||||
|
||||
/* if ( outs() != old_outs ) */
|
||||
/* { */
|
||||
/* if ( configure_outputs_callback() ) */
|
||||
/* configure_outputs_callback()( this, _configure_outputs_userdata ); */
|
||||
/* } */
|
||||
unsigned int req_buffers = required_buffers();
|
||||
|
||||
DMESSAGE( "required_buffers = %i", req_buffers );
|
||||
|
||||
|
@ -366,15 +351,6 @@ Chain::configure_ports ( void )
|
|||
|
||||
build_process_queue();
|
||||
|
||||
/* let the other chains know we mess with their buffers */
|
||||
for ( std::list<Chain*>::iterator i = chain.begin();
|
||||
i != chain.end();
|
||||
++i )
|
||||
{
|
||||
if ( *i != this )
|
||||
(*i)->build_process_queue();
|
||||
}
|
||||
|
||||
engine()->unlock();
|
||||
|
||||
parent()->redraw();
|
||||
|
@ -425,31 +401,23 @@ Chain::can_configure_outputs ( Module *m, int n ) const
|
|||
return true;
|
||||
}
|
||||
|
||||
/* return true if this chain can be converted to support /n/ input channels */
|
||||
bool
|
||||
Chain::can_support_input_channels ( int n )
|
||||
{
|
||||
/* FIXME: implement */
|
||||
return true;
|
||||
}
|
||||
|
||||
/* rename chain... we have to let our modules know our name has
|
||||
* changed so they can take the appropriate action (in particular the
|
||||
* JACK module). */
|
||||
void
|
||||
Chain::name ( const char *name )
|
||||
{
|
||||
|
||||
char ename[512];
|
||||
snprintf( ename, sizeof(ename), "%s/%s", APP_NAME, name );
|
||||
|
||||
DMESSAGE( "Renaming JACK client" );
|
||||
|
||||
_name = engine()->name( ename );
|
||||
|
||||
/* FIXME: discarding the name jack picked is technically wrong! */
|
||||
|
||||
_name = name;
|
||||
|
||||
|
||||
for ( int i = 0; i < modules(); ++i )
|
||||
module( i )->handle_chain_name_changed();
|
||||
}
|
||||
|
@ -645,9 +613,9 @@ Chain::build_process_queue ( void )
|
|||
|
||||
/* DMESSAGE( "Process queue looks like:" ); */
|
||||
|
||||
for ( std::list<Module*>::const_iterator i = process_queue.begin(); i != process_queue.end(); ++i )
|
||||
{
|
||||
const Module* m = *i;
|
||||
/* for ( std::list<Module*>::const_iterator i = process_queue.begin(); i != process_queue.end(); ++i ) */
|
||||
/* { */
|
||||
/* const Module* m = *i; */
|
||||
|
||||
/* if ( m->audio_input.size() || m->audio_output.size() ) */
|
||||
/* DMESSAGE( "\t%s", (*i)->name() ); */
|
||||
|
@ -656,14 +624,14 @@ Chain::build_process_queue ( void )
|
|||
/* else if ( m->control_input.size() ) */
|
||||
/* DMESSAGE( "\t%s <--", (*i)->name() ); */
|
||||
|
||||
{
|
||||
char *s = m->get_parameters();
|
||||
/* { */
|
||||
/* char *s = m->get_parameters(); */
|
||||
|
||||
/* DMESSAGE( "(%s)", s ); */
|
||||
|
||||
delete[] s;
|
||||
}
|
||||
}
|
||||
/* delete[] s; */
|
||||
/* } */
|
||||
/* } */
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -68,7 +68,6 @@ class Chain : public Fl_Group, public Loggable {
|
|||
void add_to_process_queue ( Module *m );
|
||||
|
||||
std::vector <Module::Port> scratch_port;
|
||||
static std::list <Chain*> chain;
|
||||
|
||||
Engine *_engine;
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
/* Filter module. Can host LADPSA Plugins, or can be inherited from to make internal
|
||||
modules with special features and appearance. */
|
||||
|
||||
#include "const.h"
|
||||
|
||||
#include "Plugin_Module.H"
|
||||
|
||||
#include <Fl/fl_draw.H>
|
||||
|
|
|
@ -11,7 +11,7 @@ Mixer_OBJS:=$(Mixer_SRCS:.C=.o)
|
|||
|
||||
Mixer_LIBS := $(FLTK_LIBS) $(JACK_LIBS) $(LASH_LIBS) -llrdf
|
||||
|
||||
Mixer/mixer: $(Mixer_OBJS) FL
|
||||
Mixer/mixer: $(Mixer_OBJS) FL nonlib
|
||||
@ echo -n Linking mixer...
|
||||
@ $(CXX) $(CXXFLAGS) $(Mixer_LIBS) $(Mixer_OBJS) -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)
|
||||
|
||||
|
|
|
@ -53,11 +53,12 @@ namespace JACK
|
|||
_freezer = NULL;
|
||||
_client = client;
|
||||
_port = port;
|
||||
_name = strdup( jack_port_name( _port ) );
|
||||
_name = strdup( jack_port_name( port ) );
|
||||
}
|
||||
|
||||
Port::Port ( JACK::Client *client, const char *name, type_e dir )
|
||||
{
|
||||
_name = NULL;
|
||||
_freezer = NULL;
|
||||
_client = client;
|
||||
activate( name, dir );
|
||||
|
@ -65,6 +66,7 @@ namespace JACK
|
|||
|
||||
Port::Port ( JACK::Client *client, type_e dir, const char *base, int n, const char *type )
|
||||
{
|
||||
_name = NULL;
|
||||
_freezer = NULL;
|
||||
_client = client;
|
||||
|
||||
|
@ -75,6 +77,7 @@ namespace JACK
|
|||
|
||||
Port::Port ( JACK::Client *client, type_e dir, int n, const char *type )
|
||||
{
|
||||
_name = NULL;
|
||||
_freezer = NULL;
|
||||
_client = client;
|
||||
|
||||
|
|
Loading…
Reference in New Issue