diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index 1c89e107e7..a1e116b6c6 100644 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -1013,7 +1013,7 @@ bool wasapi_thread_init(struct ao *ao) { struct wasapi_state *state = ao->priv; MP_DBG(ao, "Init wasapi thread\n"); - int64_t retry_wait = MP_TIME_US_TO_NS(1); + int64_t retry_wait = MP_TIME_MS_TO_NS(1); bool align_hack = false; HRESULT hr; @@ -1096,14 +1096,14 @@ retry: goto retry; case AUDCLNT_E_DEVICE_IN_USE: case AUDCLNT_E_DEVICE_INVALIDATED: - if (retry_wait > MP_TIME_US_TO_NS(8)) { + if (retry_wait > MP_TIME_MS_TO_NS(1000)) { MP_FATAL(ao, "Bad device retry failed\n"); return false; } wasapi_thread_uninit(ao); - MP_WARN(ao, "Retrying in %"PRId64" ns\n", retry_wait); + MP_WARN(ao, "Retrying in %.0f ms\n", MP_TIME_NS_TO_MS(retry_wait)); mp_sleep_ns(retry_wait); - retry_wait *= 2; + retry_wait *= 10; goto retry; } return SUCCEEDED(hr);