Always provide at least some speaker arrangement

This works around a bug in the VST3 version of W. A. Production
Imperfect as mentioned in #97. Even if it's a synth and numInputs is 0,
the plugin will still try to read the input arrangement.
This commit is contained in:
Robbert van der Helm
2021-04-28 13:35:15 +02:00
parent 23f94b35d0
commit 216c6bc4f2
2 changed files with 14 additions and 2 deletions
+2
View File
@@ -58,6 +58,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
- Prevent _Native Instruments' FM7_ from crashing when processing MIDI. As a
fix, MIDI events are now deallocated later then when they normally would have
to be.
- Fixed the VST3 version of _W. A. Production ImPerfect_ from crashing during
audio setup.
- Fixed _UVI Plugsound Free_ crashing during initialization.
- Fixed extreme DSP usage increases in _Kush Audio REDDI_ and _Expressive E
Noisy_ caused by denormals.
+12 -2
View File
@@ -1172,10 +1172,20 @@ size_t Vst3Bridge::register_object_instance(
overload{
[&](YaAudioProcessor::SetBusArrangements& request)
-> YaAudioProcessor::SetBusArrangements::Response {
// HACK: WA Production Imperfect VST3 somehow requires
// `inputs` to be a valid pointer, even if there
// are no inputs.
Steinberg::Vst::SpeakerArrangement empty_arrangement =
0;
return object_instances[request.instance_id]
.audio_processor->setBusArrangements(
request.inputs.data(), request.num_ins,
request.outputs.data(), request.num_outs);
request.num_ins > 0 ? request.inputs.data()
: &empty_arrangement,
request.num_ins,
request.num_outs > 0 ? request.outputs.data()
: &empty_arrangement,
request.num_outs);
},
[&](YaAudioProcessor::GetBusArrangement& request)
-> YaAudioProcessor::GetBusArrangement::Response {