Thank you both very much for your help. I have something that compiles and passes a number of AU Validation tests, but segfaults at the end of the AU validation.
I deleted the second for loop from the template code because I am supposed to act on both channels at once, right?
void MonoAudioProcessor::processBlock (AudioBuffer<float>& buffer, MidiBuffer& midiMessages)
auto totalNumInputChannels = getTotalNumInputChannels();
auto totalNumOutputChannels = getTotalNumOutputChannels();
// In case we have more outputs than inputs, this code clears any output
// channels that didn't contain input data, (because these aren't
// guaranteed to be empty - they may contain garbage).
// This is here to avoid people getting screaming feedback
// when they first compile a plugin, but obviously you don't need to keep
// this code if your algorithm always overwrites all the output channels.
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear (i, 0, buffer.getNumSamples());
// This is the place where you'd normally do the guts of your plugin's
// audio processing...
// Make sure to reset the state if your inner loop is processing
// the samples and the outer loop is handling the channels.
// Alternatively, you can process the samples with the channels
// interleaved by keeping the same state.
// i deleted the for loop template code that was here
// add the right (1) to the left (0)
// store the sum in the left
buffer.addFrom(0, 0, buffer, 1, 0, buffer.getNumSamples());
// copy the combined left (0) to the right (1)
buffer.copyFrom(1, 0, buffer, 0, 0, buffer.getNumSamples());
When I try to auval this, at the end I get:
Render Test at 64 frames, sample rate: 22050 Hz
Render Test at 137 frames, sample rate: 96000 Hz
Render Test at 4096 frames, sample rate: 48000 Hz
Render Test at 4096 frames, sample rate: 192000 Hz
Render Test at 4096 frames, sample rate: 11025 Hz
Render Test at 512 frames, sample rate: 44100 Hz
1 Channel Test:
Render Test at 512 frames
JUCE Assertion failure in juce_AudioSampleBuffer.h:710
validation result: crashed validation
I can’t figure out what I’m doing wrong?