Try harder to avoid redrawing capture regions.
This commit is contained in:
parent
981f92bc69
commit
c99b2f1424
|
@ -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 */
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue