13
0

Fix failed assertion with plugins with only an audio output are inserted on a MIDI track. This logic is probably completely wrong (i.e. it shouldn't be Split in the first place), but it fixes the crash, anyway.

git-svn-id: svn://localhost/ardour2/branches/3.0@11876 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2012-04-10 20:45:39 +00:00
parent aa22f85c1b
commit 99ba7de591

View File

@ -340,9 +340,12 @@ PluginInsert::connect_and_run (BufferSet& bufs, pframes_t nframes, framecnt_t of
/* copy the first stream's buffer contents to the others */
/* XXX: audio only */
Sample const * mono = bufs.get_audio (in_map.get (DataType::AUDIO, 0, &valid)).data (offset);
for (uint32_t i = in_streams.n_audio(); i < natural_input_streams().n_audio(); ++i) {
memcpy (bufs.get_audio (in_map.get (DataType::AUDIO, i, &valid)).data (offset), mono, sizeof (Sample) * nframes);
uint32_t first_idx = in_map.get (DataType::AUDIO, 0, &valid);
if (valid) {
Sample const * mono = bufs.get_audio (first_idx).data (offset);
for (uint32_t i = in_streams.n_audio(); i < natural_input_streams().n_audio(); ++i) {
memcpy (bufs.get_audio (in_map.get (DataType::AUDIO, i, &valid)).data (offset), mono, sizeof (Sample) * nframes);
}
}
}