Potential issues with audioDeviceIOCallbackWithContext() in Juce 7

What is the rationale of introducing audioDeviceIOCallbackWithContext() in Juce 7 versus merely adding an optional argument (context*) to audioDeviceIOCallback()?

Context: The change broke my host because AudioProcessorPlayer overrides this method and never calls the default anymore.

In general, introducing variants of (virtual) methods that vary only by the number of arguments is a very slippery slope. Especially if some default redirection is happening at the top. It complicates things in derived classes, where it is difficult to figure out which to override and where to redirect, considering all possible overrides up the hierarchy.

Whenever I encountered this pattern in my 25 years of OO it was a source of confusion and pain. C++ has the great benefit of optional arguments, so what was the reason not to use it here?

It broke my standalone host also… As a workaround I just pass a empty context {} to audioDeviceIOCallbackWithContext
is that safe?

Yes, that’s fine. Clients should check and be resilient against null contexts.