Browse Source

Move LASH poll timer into LASH.C.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
558cec0965
5 changed files with 21 additions and 14 deletions
  1. +13
    -0
      Timeline/LASH.C
  2. +2
    -0
      Timeline/LASH.H
  3. +3
    -0
      Timeline/LASH_Client.C
  4. +3
    -2
      Timeline/TLE.fl
  5. +0
    -12
      Timeline/main.C

+ 13
- 0
Timeline/LASH.C View File

@@ -34,16 +34,29 @@
#include "Project.H"
#include "TLE.H" // all this just for quit()

#include <FL/Fl.H>

extern TLE *tle;

#include "debug.h"

const float lash_poll_interval = 0.2f;

void
LASH::timer_cb ( void *v )
{
((LASH*)v)->poll();
Fl::repeat_timeout( lash_poll_interval, &LASH::timer_cb, v );
}

LASH::LASH ( )
{
Fl::add_timeout( lash_poll_interval, &LASH::timer_cb, this );
}

LASH::~LASH ( )
{
Fl::remove_timeout( &LASH::timer_cb );
}

bool


+ 2
- 0
Timeline/LASH.H View File

@@ -24,6 +24,8 @@
class LASH : public LASH_Client
{

static void timer_cb ( void *v );

public:

LASH ( );


+ 3
- 0
Timeline/LASH_Client.C View File

@@ -56,6 +56,9 @@ LASH_Client::init ( const char *jack_name, const char *long_name, int *argc, cha
void
LASH_Client::poll ( void )
{
if ( ! _client )
return;

lash_event_t *e;

while ( ( e = lash_get_event( _client ) ) )


+ 3
- 2
Timeline/TLE.fl View File

@@ -35,7 +35,8 @@ decl {\#include <FL/Fl_File_Chooser.H>} {}

decl {\#include <FL/Fl.H>} {}

decl {\#include <Fl/Fl_PNG_Image.H>} {}
decl {\#include <Fl/Fl_Shared_Image.H>} {selected
}

decl {extern char project_display_name[256];} {global
}
@@ -697,7 +698,7 @@ with fast, light, reliable alternatives.}
Fl_Box {} {
label {the Non-DAW (Digital Audio Workstation)}
xywh {-1 1 499 115} align 16
code0 {o->image( new Fl_PNG_Image( INSTALL_PREFIX "/share/pixmaps/non-daw/logo.png" ) );}
code0 {o->image( Fl_Shared_Image::get( INSTALL_PREFIX "/share/pixmaps/non-daw/logo.png" ) );}
}
}
}


+ 0
- 12
Timeline/main.C View File

@@ -85,16 +85,6 @@ ensure_dirs ( void )
return r == 0 || errno == EEXIST;
}

const float lash_poll_interval = 0.2f;

static void
lash_cb ( void *arg )
{
lash->poll();

Fl::repeat_timeout( lash_poll_interval, lash_cb, 0 );
}

#include <FL/Fl_Shared_Image.H>

int
@@ -139,8 +129,6 @@ main ( int argc, char **argv )

lash->init( APP_NAME, APP_TITLE, &argc, &argv );

Fl::add_timeout( lash_poll_interval, lash_cb, 0 );

if ( argc > 1 )
if ( ! Project::open( argv[ 1 ] ) )
FATAL( "Could not open project specified on command line" );


Loading…
Cancel
Save