Don't poll NSM as frequently.

pull/3/head
Jonathan Moore Liles 2012-02-23 19:46:49 -08:00
parent 080100d3b4
commit b2affcc5d5
2 changed files with 6 additions and 7 deletions

View File

@ -59,8 +59,7 @@
/* TODO: put these in a header */
#define USER_CONFIG_DIR ".non-mixer/"
const double OSC_INTERVAL = 0.1f;
const double NSM_CHECK_INTERVAL = 0.25f;
char *user_config_dir;
Mixer *mixer;
@ -94,7 +93,7 @@ void
check_nsm ( void * v )
{
nsm->check();
Fl::repeat_timeout( OSC_INTERVAL, check_nsm, v );
Fl::repeat_timeout( NSM_CHECK_INTERVAL, check_nsm, v );
}
static int got_sigterm = 0;
@ -235,7 +234,7 @@ main ( int argc, char **argv )
nsm->announce( nsm_url, APP_NAME, ":switch:dirty:", argv[0] );
// poll so we can keep OSC handlers running in the GUI thread and avoid extra sync
Fl::add_timeout( OSC_INTERVAL, check_nsm, NULL );
Fl::add_timeout( NSM_CHECK_INTERVAL, check_nsm, NULL );
}
}
else

View File

@ -65,7 +65,7 @@ const char APP_NAME[] = "Non-DAW";
const char APP_TITLE[] = "The Non-DAW";
const char COPYRIGHT[] = "Copyright (C) 2008-2010 Jonathan Moore Liles";
#define OSC_INTERVAL 0.2f
const double NSM_CHECK_INTERVAL = 0.25f;
#define PACKAGE "non"
@ -109,7 +109,7 @@ void
check_nsm ( void * v )
{
nsm->check();
Fl::repeat_timeout( OSC_INTERVAL, check_nsm, v );
Fl::repeat_timeout( NSM_CHECK_INTERVAL, check_nsm, v );
}
static int got_sigterm = 0;
@ -212,7 +212,7 @@ main ( int argc, char **argv )
nsm->announce( nsm_url, APP_NAME, ":progress:switch:", argv[0] );
/* poll so we can keep OSC handlers running in the GUI thread and avoid extra sync */
Fl::add_timeout( OSC_INTERVAL, check_nsm, NULL );
Fl::add_timeout( NSM_CHECK_INTERVAL, check_nsm, NULL );
}
}
else