13
0

make instruments/generators do the right thing when bypassed

git-svn-id: svn://localhost/ardour2/branches/3.0@9498 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-05-12 00:16:16 +00:00
parent 3ae786bb06
commit e22f93407b

View File

@ -413,7 +413,23 @@ PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end
} else {
/* FIXME: type, audio only */
if (is_generator()) {
/* silence all (audio) outputs. Should really declick
* at the transitions of "active"
*/
uint32_t out = _plugins[0]->get_info()->n_outputs.n_audio();
for (uint32_t n = 0; n < out; ++n) {
bufs.get_audio (n).silence (nframes);
}
bufs.count().set_audio (out);
} else {
/* does this need to be done with MIDI? it appears not */
uint32_t in = _plugins[0]->get_info()->n_inputs.n_audio();
uint32_t out = _plugins[0]->get_info()->n_outputs.n_audio();
@ -427,7 +443,8 @@ PluginInsert::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end
}
}
bufs.count().set_audio(out);
bufs.count().set_audio (out);
}
}
_active = _pending_active;