Browse Source

Timeline: Don't die when not running under NSM.

tags/non-daw-v1.1.0
Jonathan Moore Liles 13 years ago
parent
commit
d93a2de86b
2 changed files with 10 additions and 6 deletions
  1. +0
    -1
      nonlib/NSM/Client.C
  2. +10
    -5
      timeline/src/main.C

+ 0
- 1
nonlib/NSM/Client.C View File

@@ -150,7 +150,6 @@ namespace NSM
lo_server_thread_stop( _st ); lo_server_thread_stop( _st );
} }



int int
Client::init ( ) Client::init ( )
{ {


+ 10
- 5
timeline/src/main.C View File

@@ -106,10 +106,10 @@ shift ( char **argv, int *argc, int n )
extern Timeline *timeline; extern Timeline *timeline;


void void
check_osc ( void * v )
check_nsm ( void * v )
{ {
nsm->check(); nsm->check();
Fl::repeat_timeout( OSC_INTERVAL, check_osc, v );
Fl::repeat_timeout( OSC_INTERVAL, check_nsm, v );
} }


static int got_sigterm = 0; static int got_sigterm = 0;
@@ -210,6 +210,9 @@ main ( int argc, char **argv )
if ( ! nsm->init() ); if ( ! nsm->init() );
{ {
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 */
Fl::add_timeout( OSC_INTERVAL, check_nsm, NULL );
} }
} }
else else
@@ -229,19 +232,21 @@ main ( int argc, char **argv )
} }


/* poll so we can keep OSC handlers running in the GUI thread and avoid extra sync */
Fl::add_timeout( OSC_INTERVAL, check_osc, NULL );

Fl::add_check( check_sigterm ); Fl::add_check( check_sigterm );


Fl::run(); Fl::run();
/* cleanup for valgrind's sake */

if ( engine ) if ( engine )
{ {
delete engine; delete engine;
engine = NULL; engine = NULL;
} }


delete timeline;
timeline = NULL;

delete tle; delete tle;
tle = NULL; tle = NULL;




Loading…
Cancel
Save