Help with dsp::oversampling

I am making a fairly generic audio plugin, writing some of my own dsp functions as a way of learning them. Having some issues with the oversampling class that must be from a misunderstanding on my end on how data is organized by audioblock.

I construct the oversampler in the header file of the PluginProcessor

juce::dsp::Oversampling<float> oversampling{ getTotalNumOutputChannels(), 1, juce::dsp::Oversampling<float>::FilterType::filterHalfBandFIREquiripple, false, true};

in prepareToPlay

int numChannels = getNumInputChannels();

    oversampling.numChannels = getTotalNumInputChannels();
    oversampling.initProcessing(samplesPerBlock);
    oversampling.reset();
    float oversampledRate = sampleRate * 2.0;

    setLatencySamples(oversampling.getLatencyInSamples());

Finally in processBlock

juce::dsp::AudioBlock<float> block(buffer);
    auto oversampledBlock = oversampling.processSamplesUp(block);
    int numSamples = oversampledBlock.getNumSamples() / 2;

for (int channel = 0; channel < totalNumInputChannels; ++channel)
    {
        auto* channelData = oversampledBlock.getChannelPointer(channel);

        dspFunction.processBlock(channelData, numSamples, channel);
    }

oversampling.processSamplesDown(block);

This results in, I think, every other block being processed? Which sounds like an issue with numSamples but when I get rid of that division, the plugin immediately crashes.

This is my first post so hopefully my formatting is right and I’ve included enough information

I don’t see why you would need to divide numSamples. Perhaps something is wrong with your dspFunction?
Have a look at DSPModulePluginDemo. Look for the oversampling example in DistortionProcessor.

Hey thank you for checking out my code and issue. Honestly the confidence boost from nothing immediately visibly being wrong had me go through and comment everything out then slowly add in functions trying to find if there was a specific function causing issue.

My implementation was fine, the issue I was running into was the juce reverb algorithm was after the oversampling, but still being fed an incorrect numSamples. Giving it the regular sampling rate amount of samples per block solved my issue.