13
0

Fix a couple of thinkos causing crashes during split cycles

with plugins that are splitting e.g. mono inputs to stereo
plugins (#4169).


git-svn-id: svn://localhost/ardour2/branches/3.0@10068 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-09-12 13:17:42 +00:00
parent 632c4ab264
commit 14e083001d

View File

@ -311,7 +311,7 @@ PluginInsert::connect_and_run (BufferSet& bufs, pframes_t nframes, framecnt_t of
/* XXX: audio only */
Sample const * mono = bufs.get_audio (in_map.get (DataType::AUDIO, 0)).data (offset);
for (uint32_t i = input_streams().n_audio(); i < natural_input_streams().n_audio(); ++i) {
memcpy (bufs.get_audio (in_map.get (DataType::AUDIO, i)).data() + offset, mono + offset, sizeof (Sample) * (nframes - offset));
memcpy (bufs.get_audio (in_map.get (DataType::AUDIO, i)).data (offset), mono, sizeof (Sample) * nframes);
}
}