I am using Juce AudioPluginHost.
I would like to know if there is a way to detect CPU overload and stop the audio at this point (much like Logic or ProTools does).
I am experiencing stuttering audio and crashes of CoreAudio when using some audio interfaces and getting to a point that the CPU load is 100%.
I know this kind of thing is not deterministic and can variate between systems, but I am looking for some starting point that will cover most of the cases.
I am using this to get the CPU reading:
auto cpu = deviceManager.getCpuUsage() * 100; cpuUsageText->setButtonText (juce::String (cpu, 6) + " % Audio engine CPU");