提交 041d3b41 编写于 作者: I Igor Bochkariov 提交者: jp9000

win-wasapi: Fix audio capture after unplugging device

This commit fixes a bug where the user would have to restart OBS when
certain types of devices are unplugged and plugged back in again
(particularly USB devices).  A wait interval is required
(RECONNECT_INTERVAL) because Windows does not send any events to
IAudioCaptureClient on device invalidation.
上级 abe59f71
......@@ -448,7 +448,7 @@ DWORD WINAPI WASAPISource::CaptureThread(LPVOID param)
bool reconnect = false;
/* Output devices don't signal, so just make it check every 10 ms */
DWORD dur = source->isInputDevice ? INFINITE : 10;
DWORD dur = source->isInputDevice ? RECONNECT_INTERVAL : 10;
HANDLE sigs[2] = {
source->receiveSignal,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册