This commit reverts 8e6aeab799.
The WebBrowserComponent subprocess calls tryNextRead() in an infinite
loop. Prior to the reverted change this allowed it to handle the
transfer of larger files, which would span multiple calls to the
function. The transfer state would be remembered in the receivingLength
and pos class members.
The simplification in 8e6aeab799 mainly
comes from moving these class members into function locals, but this
means, that the transfer state is lost whenever the break statements are
hit. This would cause bad access during the transfer of larger files.
This may be due to a bug in the macOS SDK but the user facing
versions of these preprocessor definitions are returning the
incorrect details for at least the macOS 26 SDK
This also fixes an issue where endBackgroundTask wasn't guaranteed to be
called after suspended() completed. According to the docs,
endBackgroundTask must be called after the task completes.
The default error handler could cause crashes, so we now set up a custom
error handler both when reading and writing PNGs.
The HeapBlock and BitmapData automatic variables have moved, so that
their destructors will still run as expected in the failure case. Note
that it's UB to call longjmp to unwind the stack to the previous setjmp,
if said unwinding would normally cause non-trivial destructors to run.
This change also moves the PLUGINHOST config flags to the
juce_audio_processors_headless module header, as this is now the
lowest-level module that uses these flags. This change shouldn't require
any Projucer/CMake changes.
Previously, these functions would only do a synchronous rebuild of the
graph when called from the main thread. However, in scenarios like
offline rendering, the graph *must* be ready to process after
prepareToPlay() returns, even if the prepare call is made on a
background thread.