Browse Source

Timeline: Add a blinker for pending seek.

tags/non-daw-v1.1.0
Jonathan Moore Liles 16 years ago
parent
commit
aa2377be6c
4 changed files with 22 additions and 13 deletions
  1. +1
    -1
      Timeline/Engine/Engine.C
  2. +6
    -6
      Timeline/Engine/Timeline.C
  3. +14
    -5
      Timeline/TLE.fl
  4. +1
    -1
      Timeline/Timeline.H

+ 1
- 1
Timeline/Engine/Engine.C View File

@@ -100,7 +100,7 @@ Engine::sync ( jack_transport_state_t state, jack_position_t *pos )
seeking = true; seeking = true;
} }


int r = true;
bool r = true;


if ( timeline ) if ( timeline )
r = timeline->seek_pending(); r = timeline->seek_pending();


+ 6
- 6
Timeline/Engine/Timeline.C View File

@@ -126,22 +126,22 @@ Timeline::resize_buffers ( nframes_t nframes )
} }
} }


int
/** return true if any playback stream's buffer is less than 50% full */
bool
Timeline::seek_pending ( void ) Timeline::seek_pending ( void )
{ {
THREAD_ASSERT( RT );

int r = 0;
// THREAD_ASSERT( RT );


for ( int i = tracks->children(); i-- ; ) for ( int i = tracks->children(); i-- ; )
{ {
Track *t = (Track*)tracks->child( i ); Track *t = (Track*)tracks->child( i );


if ( t->playback_ds ) if ( t->playback_ds )
r += t->playback_ds->buffer_percent() < 50;
if ( t->playback_ds->buffer_percent() < 50 )
return true;
} }


return r;
return false;
} }






+ 14
- 5
Timeline/TLE.fl View File

@@ -22,7 +22,7 @@ comment {//
} {in_source in_header } {in_source in_header
} }


decl {const float STATUS_UPDATE_FREQ = 0.5f;} {}
decl {const float STATUS_UPDATE_FREQ = 0.1f;} {}


decl {\#include "Fl_Menu_Settings.H"} {} decl {\#include "Fl_Menu_Settings.H"} {}


@@ -220,7 +220,7 @@ Loggable::progress_callback( &TLE::progress_cb, this );} {}
label Timeline label Timeline
callback {if ( Fl::event_key() != FL_Escape ) callback {if ( Fl::event_key() != FL_Escape )
o->hide();} open o->hide();} open
private xywh {701 103 1025 770} type Double resizable xclass Non_DAW visible
private xywh {703 114 1025 770} type Double resizable xclass Non_DAW visible
} { } {
Fl_Menu_Bar menubar {open Fl_Menu_Bar menubar {open
private xywh {0 0 1024 25} private xywh {0 0 1024 25}
@@ -657,7 +657,7 @@ ab.run();}
} }
Fl_Box {} { Fl_Box {} {
label {<empty>} label {<empty>}
xywh {487 27 203 42} resizable
xywh {487 27 148 42} resizable
code0 {o->labeltype( FL_NO_LABEL );} code0 {o->labeltype( FL_NO_LABEL );}
} }
Fl_Group {} {open Fl_Group {} {open
@@ -720,6 +720,13 @@ ab.run();}
code0 {\#include "FL/Fl_Blinker.H"} code0 {\#include "FL/Fl_Blinker.H"}
class Fl_Blinker class Fl_Blinker
} }
Fl_Button seek_blinker {
label SEEK
xywh {640 50 50 15} box ROUNDED_BOX down_box ROUNDED_BOX color 10 selection_color 2 labelfont 2 labelcolor 39 deactivate
code0 {\#include "FL/Fl_Blinker.H"}
code1 {o->interval( Fl_Blinker::FAST );}
class Fl_Blinker
}
Fl_Box stats_box { Fl_Box stats_box {
label {<stats>} label {<stats>}
xywh {810 1 215 21} labelsize 13 labelcolor 53 align 88 xywh {810 1 215 21} labelsize 13 labelcolor 53 align 88
@@ -829,6 +836,8 @@ rec_blinker->value( transport->rolling && transport->rec_enabled() );
sm_blinker->value( timeline->session_manager_name() != NULL ); sm_blinker->value( timeline->session_manager_name() != NULL );
sm_blinker->tooltip( timeline->session_manager_name() ); sm_blinker->tooltip( timeline->session_manager_name() );
selected_blinker->value( timeline->nselected() );} {selected selected_blinker->value( timeline->nselected() );} {selected
seek_blinker->value( timeline->seek_pending() );
project_name->redraw();} {selected
} }
} }
Function {update_cb( void *v )} {open private return_type {static void} Function {update_cb( void *v )} {open private return_type {static void}
@@ -917,7 +926,7 @@ if ( logo_box->image() )
((Fl_Shared_Image*)logo_box->image())->release(); ((Fl_Shared_Image*)logo_box->image())->release();
logo_box->image( NULL ); logo_box->image( NULL );
}} open }} open
private xywh {653 248 520 740} type Double modal visible
private xywh {655 259 520 740} type Double modal visible
} { } {
Fl_Value_Output {} { Fl_Value_Output {} {
label {Sample Rate} label {Sample Rate}
@@ -1017,7 +1026,7 @@ if ( logo_box->image() )
((Fl_Shared_Image*)logo_box->image())->release(); ((Fl_Shared_Image*)logo_box->image())->release();
logo_box->image( NULL ); logo_box->image( NULL );
}} open }} open
private xywh {1344 87 495 655} type Double xclass {Non-DAW} visible
private xywh {1346 98 495 655} type Double xclass {Non-DAW} visible
} { } {
Fl_Tabs {} {open Fl_Tabs {} {open
xywh {0 264 497 392} xywh {0 264 497 392}


+ 1
- 1
Timeline/Timeline.H View File

@@ -215,6 +215,7 @@ public:
void stop ( void ); void stop ( void );


void wait_for_buffers ( void ); void wait_for_buffers ( void );
bool seek_pending ( void );


private: private:


@@ -230,5 +231,4 @@ private:
void resize_buffers ( nframes_t nframes ); void resize_buffers ( nframes_t nframes );
nframes_t process ( nframes_t nframes ); nframes_t process ( nframes_t nframes );
void seek ( nframes_t frame ); void seek ( nframes_t frame );
int seek_pending ( void );
}; };

Loading…
Cancel
Save