From 221e66d91a1eed597fa928ef76434feef6169a0d Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 29 Apr 2008 13:30:54 -0500 Subject: [PATCH] Don't bother interpolating for disconnected control tracks. --- Timeline/Control_Sequence.C | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Timeline/Control_Sequence.C b/Timeline/Control_Sequence.C index 273e955..3e01235 100644 --- a/Timeline/Control_Sequence.C +++ b/Timeline/Control_Sequence.C @@ -373,7 +373,12 @@ Control_Sequence::play ( sample_t *buf, nframes_t frame, nframes_t nframes ) nframes_t Control_Sequence::process ( nframes_t nframes ) { - void *buf = _output->buffer( nframes ); + if ( _output->connected() ) /* don't waste CPU on disconnected ports */ + { + void *buf = _output->buffer( nframes ); - return play( (sample_t*)buf, transport->frame, nframes ); + return play( (sample_t*)buf, transport->frame, nframes ); + } + else + return nframes; }