Module: wine Branch: master Commit: a30a617212788e92a7684cd861634c6bc4a8e0e0 URL: https://gitlab.winehq.org/wine/wine/-/commit/a30a617212788e92a7684cd861634c6...
Author: David McFarland corngood@gmail.com Date: Sat Aug 12 00:11:49 2023 -0300
mmdevapi: Implement IAudioClient3_GetSharedModeEnginePeriod.
For now min/max/default are all hard-coded to ~10ms.
---
dlls/mmdevapi/client.c | 15 +++++++++++---- dlls/mmdevapi/tests/render.c | 1 - 2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/mmdevapi/client.c b/dlls/mmdevapi/client.c index 5d71f079483..e0c12b8e534 100644 --- a/dlls/mmdevapi/client.c +++ b/dlls/mmdevapi/client.c @@ -929,10 +929,17 @@ static HRESULT WINAPI client_GetSharedModeEnginePeriod(IAudioClient3 *iface, UINT32 *max_period_frames) { struct audio_client *This = impl_from_IAudioClient3(iface); - FIXME("(%p)->(%p, %p, %p, %p, %p) - stub\n", This, format, default_period_frames, - unit_period_frames, min_period_frames, - max_period_frames); - return E_NOTIMPL; + FIXME("(%p)->(%p, %p, %p, %p, %p) - partial stub\n", + This, format, default_period_frames, + unit_period_frames, min_period_frames, + max_period_frames); + + *default_period_frames = + *min_period_frames = + *max_period_frames = + format->nSamplesPerSec / 100; /* ~10ms */ + *unit_period_frames = 1; + return S_OK; }
static HRESULT WINAPI client_GetCurrentSharedModeEnginePeriod(IAudioClient3 *iface, diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 14442036763..a7da68ec3f1 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -346,7 +346,6 @@ static void test_audioclient(void)
hr = IAudioClient3_GetSharedModeEnginePeriod( ac3, pwfx, &default_period, &unit_period, &min_period, &max_period); - todo_wine ok(hr == S_OK, "GetSharedModeEnginePeriod returns %08lx\n", hr);
hr = IAudioClient3_InitializeSharedAudioStream(