From b2affcc5d507afb49b9bd68a84b4e831ac07affb Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Thu, 23 Feb 2012 19:46:49 -0800 Subject: [PATCH] Don't poll NSM as frequently. --- mixer/src/main.C | 7 +++---- timeline/src/main.C | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/mixer/src/main.C b/mixer/src/main.C index 9c85aa7..7c65ce4 100644 --- a/mixer/src/main.C +++ b/mixer/src/main.C @@ -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 diff --git a/timeline/src/main.C b/timeline/src/main.C index 340d625..18a9780 100644 --- a/timeline/src/main.C +++ b/timeline/src/main.C @@ -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