Don't bother interpolating for disconnected control tracks.

This commit is contained in:
Jonathan Moore Liles 2008-04-29 13:30:54 -05:00
parent 7452987e05
commit 221e66d91a
1 changed files with 7 additions and 2 deletions

View File

@ -373,7 +373,12 @@ Control_Sequence::play ( sample_t *buf, nframes_t frame, nframes_t nframes )
nframes_t nframes_t
Control_Sequence::process ( nframes_t nframes ) Control_Sequence::process ( nframes_t nframes )
{ {
if ( _output->connected() ) /* don't waste CPU on disconnected ports */
{
void *buf = _output->buffer( nframes ); void *buf = _output->buffer( nframes );
return play( (sample_t*)buf, transport->frame, nframes ); return play( (sample_t*)buf, transport->frame, nframes );
}
else
return nframes;
} }