Fig logging for captures.

This commit is contained in:
Jonathan Moore Liles 2008-04-25 02:35:55 -05:00
parent ef0851b426
commit 6b97c912eb
5 changed files with 33 additions and 2 deletions

View File

@ -538,6 +538,15 @@ void
Loggable::log_create ( void ) const
{
// indent();
/* if ( Loggable::_level ) */
/* { */
/* /\* defer until the block ends--this is really only required for capturing... *\/ */
/* } */
log( "%s 0x%X create ", class_name(), _id );
char **sa;

View File

@ -232,6 +232,10 @@ Region::handle ( int m )
static bool copied = false;
static nframes_t os;
if ( ! active_r() )
return 0;
// int X = Fl::event_x() - _track->x();
int X = Fl::event_x();
int Y = Fl::event_y();
@ -543,6 +547,7 @@ Region::draw_fade ( const Fade &fade, Fade::fade_dir_e dir, bool line, int X, in
fl_pop_matrix();
}
void
Region::draw_box( void )
{
@ -553,6 +558,7 @@ Region::draw_box( void )
Fl_Color selection_color = _selection_color;
Fl_Color color = _box_color;
if ( this == ((Audio_Sequence*)track())->capture() )
{
color = FL_RED;
@ -954,11 +960,22 @@ Region::write ( sample_t *buf, nframes_t nframes )
return l;
}
/** prepare for capturing */
void
Region::prepare ( void )
{
log_start();
}
/** finalize region capture. Assumes that this *is* a captured region
and that no other regions refer to the same source */
bool
Region::finalize ( void )
{
log_end();
_clip->close();
_clip->open();

View File

@ -198,9 +198,11 @@ public:
void normalize ( void );
/* Engine */
nframes_t read ( sample_t *buf, nframes_t pos, nframes_t nframes, int channel ) const;
nframes_t write ( sample_t *buf, nframes_t nframes );
void prepare ( void );
bool finalize ( void );
};

View File

@ -933,6 +933,8 @@ Timeline::remove_track ( Track *track )
bool
Timeline::record ( void )
{
Loggable::block_start();
for ( int i = tracks->children(); i-- ; )
{
Track *t = (Track*)tracks->child( i );
@ -958,6 +960,8 @@ Timeline::stop ( void )
t->record_ds->stop( transport->frame );
}
Loggable::block_end();
activate();
}

View File

@ -635,8 +635,7 @@ Track::record ( nframes_t frame )
_capture = new Region( af, track(), frame );
/* FIXME: wrong place for this */
_capture->_r->end = 0;
_capture->prepare();
}
/* THREAD: IO */