[PATCH v4 3/3] winepulse: Return device-specific values for GetDevicePeriod
Claire Girka
wine at gitlab.winehq.org
Mon Jul 4 05:05:39 CDT 2022
From: Claire Girka <claire at sitedethib.com>
---
dlls/winepulse.drv/mmdevdrv.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index 8c5d0cf7214..c1755157d94 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -1159,6 +1159,7 @@ static HRESULT WINAPI AudioClient_GetMixFormat(IAudioClient3 *iface,
static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient3 *iface,
REFERENCE_TIME *defperiod, REFERENCE_TIME *minperiod)
{
+ struct get_device_settings_params params;
ACImpl *This = impl_from_IAudioClient3(iface);
TRACE("(%p)->(%p, %p)\n", This, defperiod, minperiod);
@@ -1166,10 +1167,15 @@ static HRESULT WINAPI AudioClient_GetDevicePeriod(IAudioClient3 *iface,
if (!defperiod && !minperiod)
return E_POINTER;
+ params.render = This->dataflow == eRender;
+ params.pulse_name = This->pulse_name;
+ params.config = &pulse_config;
+ pulse_call(get_device_settings, ¶ms);
+
if (defperiod)
- *defperiod = pulse_config.modes[This->dataflow == eCapture].def_period;
+ *defperiod = params.def_period;
if (minperiod)
- *minperiod = pulse_config.modes[This->dataflow == eCapture].min_period;
+ *minperiod = params.min_period;
return S_OK;
}
--
GitLab
https://gitlab.winehq.org/wine/wine/-/merge_requests/337
More information about the wine-devel
mailing list