diff --git a/mixer/src/Mixer.C b/mixer/src/Mixer.C index 69cf253..6ef59ca 100644 --- a/mixer/src/Mixer.C +++ b/mixer/src/Mixer.C @@ -341,7 +341,7 @@ void Mixer::update_frequency ( float v ) { _update_interval = 1.0f / v; - Fl::remove_timeout( &Mixer::update_cb ); + Fl::remove_timeout( &Mixer::update_cb, this ); Fl::add_timeout( _update_interval, &Mixer::update_cb, this ); } @@ -356,9 +356,12 @@ Mixer::update_cb ( void ) { Fl::repeat_timeout( _update_interval, &Mixer::update_cb, this ); - for ( int i = 0; i < mixer_strips->children(); i++ ) + if ( active_r() && visible_r() ) { - ((Mixer_Strip*)mixer_strips->child(i))->update(); + for ( int i = 0; i < mixer_strips->children(); i++ ) + { + ((Mixer_Strip*)mixer_strips->child(i))->update(); + } } } @@ -537,6 +540,8 @@ Mixer::~Mixer ( ) save_options(); + Fl::remove_timeout( &Mixer::update_cb, this ); + /* FIXME: teardown */ mixer_strips->clear(); } diff --git a/mixer/src/Mixer_Strip.C b/mixer/src/Mixer_Strip.C index 6c82f03..278692a 100644 --- a/mixer/src/Mixer_Strip.C +++ b/mixer/src/Mixer_Strip.C @@ -364,6 +364,7 @@ Mixer_Strip::update ( void ) meter_indicator->update(); gain_controller->update(); + if ( _chain ) _chain->update(); }