Handle case where an audio-port is added to a MIDI only delayline
authorRobin Gareus <robin@gareus.org>
Fri, 27 Sep 2019 12:50:40 +0000 (14:50 +0200)
committerRobin Gareus <robin@gareus.org>
Fri, 27 Sep 2019 12:50:40 +0000 (14:50 +0200)
libs/ardour/delayline.cc

index 666ad3e302061ddf38d41745560b93429f0c7551..42120c47572afd30b1ee2f034bb561ee6c5b85df 100644 (file)
@@ -206,6 +206,10 @@ DelayLine::run (BufferSet& bufs, samplepos_t /* start_sample */, samplepos_t /*
        } else {
                /* set new delay for MIDI only */
                _delay = pending_delay;
+
+               /* prepare for the case that an audio-port is added */
+               _woff = _delay;
+               _roff = 0;
        }
 
        if (_midi_buf.get ()) {