Browse Source

Timeline: Fix segfault in control sequence playback

Closes #173
tags/non-daw-v1.2.0
Jonathan Moore Liles 8 years ago
parent
commit
cfe4aec158
2 changed files with 8 additions and 5 deletions
  1. +5
    -1
      timeline/src/Engine/Control_Sequence.C
  2. +3
    -4
      timeline/src/Timeline.C

+ 5
- 1
timeline/src/Engine/Control_Sequence.C View File

@@ -85,8 +85,12 @@ Control_Sequence::play ( sample_t *buf, nframes_t frame, nframes_t nframes )
incr = 0.0f;
float v = y1 + start * incr;

if ( ! n )
/* buffer's full, no point in continuing */
break;
for ( nframes_t i = start; i < len && n--; ++i, v += incr )
for ( nframes_t i = start; i < len && n && n--; ++i, v += incr )
*(buf++) = v;
}



+ 3
- 4
timeline/src/Timeline.C View File

@@ -2208,16 +2208,15 @@ Timeline::process_osc ( void )
{
THREAD_ASSERT( OSC );

/* rdlock(); */
sequence_lock.rdlock();

/* reconnect OSC signals */
for ( int i = tracks->children(); i-- ; )
{
Track *t = (Track*)tracks->child( i );
t->process_osc();
}
/* unlock(); */
sequence_lock.unlock();
}


Loading…
Cancel
Save