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:
parent
aa22f85c1b
commit
99ba7de591
@ -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 */
|
/* copy the first stream's buffer contents to the others */
|
||||||
/* XXX: audio only */
|
/* XXX: audio only */
|
||||||
Sample const * mono = bufs.get_audio (in_map.get (DataType::AUDIO, 0, &valid)).data (offset);
|
uint32_t first_idx = in_map.get (DataType::AUDIO, 0, &valid);
|
||||||
for (uint32_t i = in_streams.n_audio(); i < natural_input_streams().n_audio(); ++i) {
|
if (valid) {
|
||||||
memcpy (bufs.get_audio (in_map.get (DataType::AUDIO, i, &valid)).data (offset), mono, sizeof (Sample) * nframes);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user