This might be a long shot but I am trying to solve a bug where audio stops working in the app after my computer wakes from sleep. The audio device type is a WASAPI audio device I am using the AudioDeviceManager to manage the audio devices when suspended() is called I make a call AudioDeviceManager::closeAudioDevice(). In resume I create an AudioDeviceManager::AudioDeviceSetup and then call AudioDeviceManager::setAudioDeviceSetup() passing it that setup and finally call AudioDeviceManager::restartLastAudioDevice() and the audio callback never starts.
Interestingly enough if I put a Sleep(1000) before the call to restartLastAudioDevice() for at least some users this seems to solve the problem. I have noticed WASAPI seems to create this OnSessionDisconnected error but checking for this and repeating the restart process doesn’t solve the problem.
Has anyone ran into something like this with WASAPI or AudioDeviceManager class. It appears to find the audio device but the callback itself just never starts. Any thoughts or suggestions on things to check are appreciated