13
0

avoid memcpy if it's not needed.

besides, memcpy areas may not overlap
This commit is contained in:
Robin Gareus 2016-03-15 18:47:39 +01:00
parent 3239876faf
commit 71c6cbecda

View File

@ -600,7 +600,9 @@ VSTPlugin::connect_and_run (BufferSet& bufs,
if (!valid) {
continue;
}
copy_vector (bufs.get_audio(index).data(offset), outs[i], nframes);
if (outs[i] != bufs.get_audio(index).data(offset)) {
copy_vector (bufs.get_audio(index).data(offset), outs[i], nframes);
}
}
return 0;
}