Mixer: Fixes for consolidated timeout.

This commit is contained in:
Jonathan Moore Liles 2013-06-17 19:54:39 -07:00
parent bbffb98981
commit 582621edd2
2 changed files with 9 additions and 3 deletions

View File

@ -341,7 +341,7 @@ void Mixer::update_frequency ( float v )
{ {
_update_interval = 1.0f / 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 ); Fl::add_timeout( _update_interval, &Mixer::update_cb, this );
} }
@ -356,11 +356,14 @@ Mixer::update_cb ( void )
{ {
Fl::repeat_timeout( _update_interval, &Mixer::update_cb, this ); Fl::repeat_timeout( _update_interval, &Mixer::update_cb, this );
if ( active_r() && visible_r() )
{
for ( int i = 0; i < mixer_strips->children(); i++ ) for ( int i = 0; i < mixer_strips->children(); i++ )
{ {
((Mixer_Strip*)mixer_strips->child(i))->update(); ((Mixer_Strip*)mixer_strips->child(i))->update();
} }
} }
}
static void static void
@ -537,6 +540,8 @@ Mixer::~Mixer ( )
save_options(); save_options();
Fl::remove_timeout( &Mixer::update_cb, this );
/* FIXME: teardown */ /* FIXME: teardown */
mixer_strips->clear(); mixer_strips->clear();
} }

View File

@ -364,6 +364,7 @@ Mixer_Strip::update ( void )
meter_indicator->update(); meter_indicator->update();
gain_controller->update(); gain_controller->update();
if ( _chain )
_chain->update(); _chain->update();
} }