Hello there. I’m trying to create a stereo input, 5.1 layout output plugin.
class MyAudioProcessor : public juce::AudioProcessor
{
public:
MyAudioProcessor()
: AudioProcessor(BusesProperties().withInput("Input", juce::AudioChannelSet::stereo())
.withOutput("Output", juce::AudioChannelSet::create5point1()))
{
// Constructor
}
void processBlock(juce::AudioBuffer<float>& buffer, juce::MidiBuffer&) override
{
const int totalNumInputChannels = getTotalNumInputChannels();
const int totalNumOutputChannels = getTotalNumOutputChannels();
}
// Other overridden methods...
};
I test the plugin with Cubase, as VST3. Standalone plugin does not crash but VST3 crashes. I write processed samples to each channel at the end of processBlock call. (sample by sample)
Writing samples to channels, (for channelIndex >=2) results with a read access violation. What would be the problem?