Browse Source

Don't poll NSM as frequently.

tags/non-daw-v1.1.0
Jonathan Moore Liles 13 years ago
parent
commit
b2affcc5d5
2 changed files with 6 additions and 7 deletions
  1. +3
    -4
      mixer/src/main.C
  2. +3
    -3
      timeline/src/main.C

+ 3
- 4
mixer/src/main.C View File

@@ -59,8 +59,7 @@
/* TODO: put these in a header */ /* TODO: put these in a header */
#define USER_CONFIG_DIR ".non-mixer/" #define USER_CONFIG_DIR ".non-mixer/"



const double OSC_INTERVAL = 0.1f;
const double NSM_CHECK_INTERVAL = 0.25f;


char *user_config_dir; char *user_config_dir;
Mixer *mixer; Mixer *mixer;
@@ -94,7 +93,7 @@ void
check_nsm ( void * v ) check_nsm ( void * v )
{ {
nsm->check(); nsm->check();
Fl::repeat_timeout( OSC_INTERVAL, check_nsm, v );
Fl::repeat_timeout( NSM_CHECK_INTERVAL, check_nsm, v );
} }


static int got_sigterm = 0; static int got_sigterm = 0;
@@ -235,7 +234,7 @@ main ( int argc, char **argv )
nsm->announce( nsm_url, APP_NAME, ":switch:dirty:", argv[0] ); 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 // 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 else


+ 3
- 3
timeline/src/main.C View File

@@ -65,7 +65,7 @@ const char APP_NAME[] = "Non-DAW";
const char APP_TITLE[] = "The Non-DAW"; const char APP_TITLE[] = "The Non-DAW";
const char COPYRIGHT[] = "Copyright (C) 2008-2010 Jonathan Moore Liles"; 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" #define PACKAGE "non"


@@ -109,7 +109,7 @@ void
check_nsm ( void * v ) check_nsm ( void * v )
{ {
nsm->check(); nsm->check();
Fl::repeat_timeout( OSC_INTERVAL, check_nsm, v );
Fl::repeat_timeout( NSM_CHECK_INTERVAL, check_nsm, v );
} }


static int got_sigterm = 0; static int got_sigterm = 0;
@@ -212,7 +212,7 @@ main ( int argc, char **argv )
nsm->announce( nsm_url, APP_NAME, ":progress:switch:", argv[0] ); 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 */ /* 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 else


Loading…
Cancel
Save