Module: wine Branch: master Commit: fcf82e335288d8f6a9206ee8e142955a8189bcf6 URL: https://gitlab.winehq.org/wine/wine/-/commit/fcf82e335288d8f6a9206ee8e142955...
Author: Anton Baskanov baskanov@gmail.com Date: Wed Nov 22 15:38:30 2023 +0700
dmime: Always queue messages with non-immediate delivery type.
---
dlls/dmime/performance.c | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-)
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index e2ca75b9c10..aa892d108c0 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -134,37 +134,13 @@ static struct message *performance_get_message(struct performance *This, DWORD *
static HRESULT performance_process_message(struct performance *This, DMUS_PMSG *msg) { - static const DWORD delivery_flags = DMUS_PMSGF_TOOL_IMMEDIATE | DMUS_PMSGF_TOOL_QUEUE | DMUS_PMSGF_TOOL_ATTIME; IDirectMusicPerformance *performance = (IDirectMusicPerformance *)&This->IDirectMusicPerformance8_iface; + IDirectMusicTool *tool; HRESULT hr;
- do - { - REFERENCE_TIME latency, offset = 0; - IDirectMusicTool *tool; - - if (FAILED(hr = IDirectMusicPerformance_GetLatencyTime(performance, &latency))) return hr; - if (!(tool = msg->pTool)) tool = &This->IDirectMusicTool_iface; + if (!(tool = msg->pTool)) tool = &This->IDirectMusicTool_iface;
- switch (msg->dwFlags & delivery_flags) - { - default: - WARN("No delivery flag found for message %p\n", msg); - /* fallthrough */ - case DMUS_PMSGF_TOOL_IMMEDIATE: - hr = IDirectMusicTool_ProcessPMsg(tool, performance, msg); - break; - case DMUS_PMSGF_TOOL_QUEUE: - offset = This->dwBumperLength * 10000; - /* fallthrough */ - case DMUS_PMSGF_TOOL_ATTIME: - if (msg->rtTime >= offset && msg->rtTime - offset >= latency) - return DMUS_S_REQUEUE; - - hr = IDirectMusicTool_ProcessPMsg(tool, performance, msg); - break; - } - } while (hr == DMUS_S_REQUEUE); + hr = IDirectMusicTool_ProcessPMsg(tool, performance, msg);
if (hr == DMUS_S_FREE) hr = IDirectMusicPerformance_FreePMsg(performance, msg); if (FAILED(hr)) WARN("Failed to process message, hr %#lx\n", hr);