When the audio device goes away during playback or capture, we were
going into an infinite loop of AUDCLNT_E_DEVICE_INVALIDATED
. Return -1
and post an error message so the ringbuffer thread exits with an error.
When the audio device goes away during playback or capture, we were
going into an infinite loop of AUDCLNT_E_DEVICE_INVALIDATED
. Return -1
and post an error message so the ringbuffer thread exits with an error.