mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
VST Client: Clean up VstSpeakerArrangement offset calcuation
This commit is contained in:
parent
93063de28d
commit
1fffffde04
1 changed files with 5 additions and 5 deletions
|
|
@ -1970,13 +1970,13 @@ private:
|
|||
if (pluginHasSidechainsOrAuxs() || processor->isMidiEffect())
|
||||
return false;
|
||||
|
||||
auto inputLayout = processor->getChannelLayoutOfBus (true, 0);
|
||||
auto outputLayout = processor->getChannelLayoutOfBus (false, 0);
|
||||
auto inputLayout = processor->getChannelLayoutOfBus (true, 0);
|
||||
auto outputLayout = processor->getChannelLayoutOfBus (false, 0);
|
||||
|
||||
auto speakerBaseSize = sizeof (Vst2::VstSpeakerArrangement) - (sizeof (Vst2::VstSpeakerProperties) * 8);
|
||||
const auto speakerBaseSize = offsetof (Vst2::VstSpeakerArrangement, speakers);
|
||||
|
||||
cachedInArrangement .malloc (speakerBaseSize + (static_cast<std::size_t> (inputLayout. size()) * sizeof (Vst2::VstSpeakerArrangement)), 1);
|
||||
cachedOutArrangement.malloc (speakerBaseSize + (static_cast<std::size_t> (outputLayout.size()) * sizeof (Vst2::VstSpeakerArrangement)), 1);
|
||||
cachedInArrangement .malloc (speakerBaseSize + (static_cast<std::size_t> (inputLayout. size()) * sizeof (Vst2::VstSpeakerProperties)), 1);
|
||||
cachedOutArrangement.malloc (speakerBaseSize + (static_cast<std::size_t> (outputLayout.size()) * sizeof (Vst2::VstSpeakerProperties)), 1);
|
||||
|
||||
*pluginInput = cachedInArrangement. getData();
|
||||
*pluginOutput = cachedOutArrangement.getData();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue