AudioProcessorGraph PDC and changing latency

Thanks for the update!

What do you mean ? I was under the impression that bypass delays had to be implemented on the plugin side ?

Youā€™re assuming every plugin developer overrides AudioProcessor::processBypassed() and handles thisā€¦ if they donā€™t then the delay compensation can be wrong if the AudioProcessorGraph is bypassedā€¦ Iā€™ve added a delay to AudioProcessor and in the AudioProcessorā€™s processBypassed() method I delay the audio by the latency amount. processBypassed() is not a pure virtual method so developers arenā€™t forced to override it.

I had to add a new method:

AudioProcessor::prepareBypassDelay()

which gets called in AudioProcessorGraph:: setBypassed()

        void setBypassed (bool shouldBeBypassed) noexcept
        {
            if (processor != nullptr)
            {
                if (auto* bypassParam = processor->getBypassParameter())
                    bypassParam->setValueNotifyingHost (shouldBeBypassed ? 1.0f : 0.0f);
            
                // Added by Rail Jon Rogut
            
                if (shouldBeBypassed)
                    processor->prepareBypassDelay();
            }

            bypassed = shouldBeBypassed;
        }

Rail

1 Like

Indeed in my use case I have control over the plugins, so I implemented AudioProcessor::processBypassed() for each of them, thanks for the clarification!

Hey @railjonrogut Iā€™m confused about the rebuild() function.
It is present in the juce documentation, but it doesnā€™t seem to be implemented in the latest release (7.0.5)
It is implemented in on the develop branch.
Have you actually succeeded in using it? Am I missing something or is this something to be reported the juce devs ?

The develop branch has the change/additionā€¦ you can either use the develop branch or use the master branch and wait for them to merge the develop branch into the master branch.

Rail

1 Like