From 212de13d428884a28e691f5b5b17cdf615e7e4ea Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 7 Oct 2011 16:30:27 +0000 Subject: Make panner tolerate 0 audio inputs (fix #4353). git-svn-id: svn://localhost/ardour2/branches/3.0@10194 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/panner_shell.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libs/ardour/panner_shell.cc') diff --git a/libs/ardour/panner_shell.cc b/libs/ardour/panner_shell.cc index fae60c3458..8c0236bd9f 100644 --- a/libs/ardour/panner_shell.cc +++ b/libs/ardour/panner_shell.cc @@ -271,6 +271,14 @@ PannerShell::distribute_no_automation (BufferSet& inbufs, BufferSet& outbufs, pf void PannerShell::run (BufferSet& inbufs, BufferSet& outbufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes) { + if (inbufs.count().n_audio() == 0) { + /* Input has no audio buffers (e.g. Aux Send in a MIDI track at a + point with no audio because there is no preceding instrument + */ + outbufs.silence(nframes, 0); + return; + } + if (outbufs.count().n_audio() == 0) { // Failing to deliver audio we were asked to deliver is a bug assert(inbufs.count().n_audio() == 0); -- cgit v1.2.3