VSTs don't process in-place
This commit is contained in:
parent
17e809bdc3
commit
41b1ecaaf0
@ -42,6 +42,7 @@ public:
|
||||
void deactivate ();
|
||||
|
||||
int set_block_size (pframes_t);
|
||||
bool inplace_broken() const { return true; }
|
||||
float default_value (uint32_t port);
|
||||
float get_parameter (uint32_t port) const;
|
||||
uint32_t nth_parameter (uint32_t port, bool& ok) const;
|
||||
|
@ -565,7 +565,12 @@ VSTPlugin::connect_and_run (BufferSet& bufs,
|
||||
|
||||
uint32_t out_index = 0;
|
||||
for (i = 0; i < (int32_t) _plugin->numOutputs; ++i) {
|
||||
outs[i] = scratch_bufs.get_audio(i).data(offset);
|
||||
uint32_t index;
|
||||
bool valid = false;
|
||||
index = out_map.get(DataType::AUDIO, out_index++, &valid);
|
||||
outs[i] = (valid)
|
||||
? bufs.get_audio(index).data(offset)
|
||||
: scratch_bufs.get_audio(0).data(offset);
|
||||
}
|
||||
|
||||
if (bufs.count().n_midi() > 0) {
|
||||
@ -592,18 +597,6 @@ VSTPlugin::connect_and_run (BufferSet& bufs,
|
||||
_plugin->processReplacing (_plugin, &ins[0], &outs[0], nframes);
|
||||
_midi_out_buf = 0;
|
||||
|
||||
out_index = 0;
|
||||
for (i = 0; i < (int32_t) _plugin->numOutputs; ++i) {
|
||||
uint32_t index;
|
||||
bool valid = false;
|
||||
index = out_map.get(DataType::AUDIO, out_index++, &valid);
|
||||
if (!valid) {
|
||||
continue;
|
||||
}
|
||||
if (outs[i] != bufs.get_audio(index).data(offset)) {
|
||||
copy_vector (bufs.get_audio(index).data(offset), outs[i], nframes);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user