mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
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.
This commit is contained in:
parent
abe59f7187
commit
041d3b4155
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user