Module: wine Branch: master Commit: 1014bab951f89a51226a17ec1d6d8d1225c46c5c URL: https://gitlab.winehq.org/wine/wine/-/commit/1014bab951f89a51226a17ec1d6d8d1...
Author: Rémi Bernon rbernon@codeweavers.com Date: Mon Oct 16 11:41:34 2023 +0200
dmime: Use latency time to decide when to process messages.
---
dlls/dmime/performance.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index a56a35a2f45..dc6ef575713 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -89,10 +89,10 @@ static HRESULT performance_process_message(struct performance *This, DMUS_PMSG *
do { - REFERENCE_TIME current, offset = 0; + REFERENCE_TIME latency, offset = 0; IDirectMusicTool *tool;
- if (FAILED(hr = IDirectMusicPerformance_GetTime(performance, ¤t, NULL))) return hr; + if (FAILED(hr = IDirectMusicPerformance_GetLatencyTime(performance, &latency))) return hr; if (!(tool = msg->pTool)) tool = &This->IDirectMusicTool_iface;
switch (msg->dwFlags & delivery_flags) @@ -107,9 +107,9 @@ static HRESULT performance_process_message(struct performance *This, DMUS_PMSG * offset = This->dwBumperLength * 10000; /* fallthrough */ case DMUS_PMSGF_TOOL_ATTIME: - if (msg->rtTime >= offset && msg->rtTime - offset >= current) + if (msg->rtTime >= offset && msg->rtTime - offset >= latency) { - if (timeout) *timeout = (msg->rtTime - offset - current) / 10000; + if (timeout) *timeout = (msg->rtTime - offset - latency) / 10000; return DMUS_S_REQUEUE; }