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;
Fl::remove_timeout( &Mixer::update_cb );
Fl::remove_timeout( &Mixer::update_cb, this );
Fl::add_timeout( _update_interval, &Mixer::update_cb, this );
}
@ -356,10 +356,13 @@ Mixer::update_cb ( void )
{
Fl::repeat_timeout( _update_interval, &Mixer::update_cb, this );
if ( active_r() && visible_r() )
{
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();
}

View File

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