diff --git a/Timeline/Record_DS.C b/Timeline/Record_DS.C index 83895e9..f755315 100644 --- a/Timeline/Record_DS.C +++ b/Timeline/Record_DS.C @@ -67,12 +67,13 @@ Record_DS::disk_thread ( void ) for ( int i = channels(); i--; ) { - while ( jack_ringbuffer_read_space( _rb[ i ] ) < block_size ) - { - printf( "IO: disk buffer underrun!\n" ); - /* FIXME: is this *really* the right thing to do? */ - usleep( 2000 ); - } + +/* while ( jack_ringbuffer_read_space( _rb[ i ] ) < block_size ) */ +/* { */ +/* printf( "IO: disk buffer underrun!\n" ); */ +/* /\* FIXME: is this *really* the right thing to do? *\/ */ +/* usleep( 2000 ); */ +/* } */ /* FIXME: avoid this copy */ diff --git a/Timeline/Region.C b/Timeline/Region.C index e1c9824..e5958f9 100644 --- a/Timeline/Region.C +++ b/Timeline/Region.C @@ -883,11 +883,21 @@ Region::write ( nframes_t nframes ) if ( 0 == ( timeline->ts_to_x( _range.end ) % 20 ) ) { - /* FIXME: hack to get new size */ + nframes_t oldl = _clip->length(); + + /* FIXME: hack */ _clip->close(); _clip->open(); - redraw(); + int W = timeline->ts_to_x( _clip->length() - oldl ); + + /* why - 1? */ + + if ( W ) + { + ++W; + track()->damage( FL_DAMAGE_EXPOSE, x() + w() - W, y(), W, h() ); + } } return nframes; @@ -912,5 +922,7 @@ Region::finalize ( void ) _clip->close(); _clip->open(); + _range.end = _clip->length(); + return true; }