Windows Audio - disconnecting devices

When I have an audio callback registered with AudioDeviceManager in Windows, and I disconnect the audio device when my computer is alseep, when it comes out of suspend the audio call back is still being called … but very very fast ! Is there something I should be doing to catch this and disable the device??

For the record, this was fixed in this commit: