Browse Source

Try harder to avoid redrawing capture regions.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
c99b2f1424
2 changed files with 21 additions and 8 deletions
  1. +7
    -6
      Timeline/Record_DS.C
  2. +14
    -2
      Timeline/Region.C

+ 7
- 6
Timeline/Record_DS.C View File

@@ -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 */



+ 14
- 2
Timeline/Region.C View File

@@ -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…
Cancel
Save