Mixer: Fix GUI update on Controller_Modules being controlled via JACK CV.
This commit is contained in:
parent
4a22d675e2
commit
e9804033ab
|
@ -71,14 +71,14 @@ Controller_Module::Controller_Module ( bool is_default ) : Module( is_default, 5
|
|||
|
||||
end();
|
||||
|
||||
// Fl::add_timeout( CONTROL_UPDATE_FREQ, update_cb, this );
|
||||
Fl::add_timeout( CONTROL_UPDATE_FREQ, update_cb, this );
|
||||
|
||||
log_create();
|
||||
}
|
||||
|
||||
Controller_Module::~Controller_Module ( )
|
||||
{
|
||||
// Fl::remove_timeout( update_cb, this );
|
||||
Fl::remove_timeout( update_cb, this );
|
||||
|
||||
log_destroy();
|
||||
|
||||
|
@ -420,8 +420,14 @@ Controller_Module::update_cb ( void )
|
|||
{
|
||||
Fl::repeat_timeout( CONTROL_UPDATE_FREQ, update_cb, this );
|
||||
|
||||
/* we only need this in CV (JACK) mode, because with other forms
|
||||
* of control the change happens in the GUI thread and we know it */
|
||||
if ( mode() != CV )
|
||||
return;
|
||||
|
||||
/* ensures that port value change callbacks are run */
|
||||
if ( control && control_output.size() > 0 && control_output[0].connected() )
|
||||
handle_control_changed( NULL );
|
||||
control_output[0].connected_port()->control_value( control_value );
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -544,6 +550,9 @@ Controller_Module::handle_control_changed ( Port *p )
|
|||
if ( p )
|
||||
control_value = p->control_value();
|
||||
|
||||
if ( control->value() == control_value )
|
||||
return;
|
||||
|
||||
/* if ( control->value() != control_value ) */
|
||||
/* { */
|
||||
/* redraw(); */
|
||||
|
|
|
@ -297,8 +297,7 @@ Module::Port::osc_control_change_exact ( const char *path, const char *types, lo
|
|||
|
||||
p->control_value( f );
|
||||
|
||||
// mixer->osc_endpoint->send( lo_message_get_source( msg ), "/reply", path, "ok" );
|
||||
mixer->osc_endpoint->send( lo_message_get_source( msg ), path, f );
|
||||
mixer->osc_endpoint->send( lo_message_get_source( msg ), "/reply", path, f );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -328,8 +327,7 @@ Module::Port::osc_control_change_cv ( const char *path, const char *types, lo_ar
|
|||
|
||||
p->control_value( f );
|
||||
|
||||
// mixer->osc_endpoint->send( lo_message_get_source( msg ), "/reply", path, "ok" );
|
||||
mixer->osc_endpoint->send( lo_message_get_source( msg ), path, f );
|
||||
mixer->osc_endpoint->send( lo_message_get_source( msg ), "/reply", path, f );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue