wasapi: Fix infinite loop when the device disappears
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 14 Jan 2019 20:33:23 +0000 (02:03 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Mon, 14 Jan 2019 21:59:58 +0000 (03:29 +0530)
commitd56aec8b0cceb15457712476f9690bd0f18e33ac
tree0ef513c13d09b06eddf2ebf4effb97c117df0410
parent7a01e9a8cb01fdc55c636cce4d60068547a9afb1
wasapi: Fix infinite loop when the device disappears

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.
sys/wasapi/gstwasapisink.c
sys/wasapi/gstwasapisrc.c
sys/wasapi/gstwasapiutil.h