mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-13 00:04:19 +00:00
VST3 Client: Avoid AudioBuffer assertion when plugin has no audio channels
This commit is contained in:
parent
6ea3788a3b
commit
c2ec851c2c
1 changed files with 6 additions and 1 deletions
|
|
@ -597,6 +597,8 @@ public:
|
|||
|
||||
auto* getNextChannelBuffer() { return buffer.getWritePointer (channelCounter++); }
|
||||
|
||||
auto getArrayOfWritePointers() { return buffer.getArrayOfWritePointers(); }
|
||||
|
||||
private:
|
||||
AudioBuffer<FloatType> buffer;
|
||||
int channelCounter = 0;
|
||||
|
|
@ -673,7 +675,10 @@ public:
|
|||
setUpInputChannels (data, (size_t) vstInputs, scratchBuffer, inputMap, channels);
|
||||
setUpOutputChannels (scratchBuffer, outputMap, channels);
|
||||
|
||||
return { channels.data(), (int) channels.size(), (int) data.numSamples };
|
||||
const auto channelPtr = channels.empty() ? scratchBuffer.getArrayOfWritePointers()
|
||||
: channels.data();
|
||||
|
||||
return { channelPtr, (int) channels.size(), (int) data.numSamples };
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue