No sound after sleep

Hi,

Sometimes (often) after waking the system from sleep, there is no sound from JUCE. Running AudioDeviceManager::playTestSound seem to work, but no actual sound can be heard.

Most of the time, the problem can be solved by closing and reopening the audio devices (closeAudioDevice/restartLastAudioDevice), but often you need to switch to another output device and back in order to make it work.

In some cases not even that is enough; the only thing that can bring sound back to life is to close the application altogether and start from scratch.

Does anyone recognize this? Is there any way to address it?

Thanks
Erik

Bumping this thread. Is there really no-one else having this problem?

I suspect that this is not actually Juce-related, but how the OS and the audio device interact. I don’t have proof of that, but I suspect it may be the case. I often encounter similar issues with audio devices that do not relate to a specific plugin.

That may be so, but in that case, why doesn’t it affect other (non-JUCE) applications?

Sounds similar to this thread from 2017: