On my system at least, I reliably get a CoreAudio error when I simply turn my interface off, which results in a jassert and program halting in a debug build, and just a log file entry in a release build.
I assume when I start wider testing I’ll find all sorts of ways to generate CoreAudio errors.
I’d much rather get a chance to handle such errors myself (probably bringing up a dialog saying, “The program’s lost connection with your audio interface, perhaps because it was turned off or disconnected”).
Hmm, the logging in there was really just for debugging - I guess the only clean way to expose a callback function would be to add a virtual method to the AudioIODeviceCallback, which could be possible…