wasapi2: Warm up capture audio client on open
If the endpoint is idle, the first IAudioClient::Start() call may take a long time to return. Start/stop the capture client on open to reduce latency of subsequent Start() calls. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9553>
This commit is contained in:
parent
cb7dcff69e
commit
7a48a0036f
@ -887,6 +887,13 @@ gst_wasapi2_device_manager_create_ctx (IMMDeviceEnumerator * enumerator,
|
||||
}
|
||||
}
|
||||
|
||||
/* Warm up device, first Start() call may take long if device is in idle state */
|
||||
if (ctx->capture_client && !ctx->dummy_client) {
|
||||
ctx->client->Start ();
|
||||
ctx->client->Stop ();
|
||||
ctx->client->Reset ();
|
||||
}
|
||||
|
||||
ctx->is_default = is_default;
|
||||
ctx->endpoint_class = endpoint_class;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user