Module: wine Branch: master Commit: 29a76fb5d1b022c1c460b694238c6be1a4c211a5 URL: https://gitlab.winehq.org/wine/wine/-/commit/29a76fb5d1b022c1c460b694238c6be...
Author: Rémi Bernon rbernon@codeweavers.com Date: Tue Aug 29 14:40:05 2023 +0200
dmsynth: Do nothing in IDirectMusicSynth_SetMasterClock.
---
dlls/dmsynth/synth.c | 7 +++---- dlls/dmsynth/tests/dmsynth.c | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index b7174000e20..941fc465d17 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -915,10 +915,9 @@ static HRESULT WINAPI synth_SetMasterClock(IDirectMusicSynth8 *iface,
TRACE("(%p)->(%p)\n", This, clock);
- if (!This->sink) - return DMUS_E_NOSYNTHSINK; - - return IDirectMusicSynthSink_SetMasterClock(This->sink, clock); + if (!clock) + return E_POINTER; + return S_OK; }
static HRESULT WINAPI synth_GetLatencyClock(IDirectMusicSynth8 *iface, diff --git a/dlls/dmsynth/tests/dmsynth.c b/dlls/dmsynth/tests/dmsynth.c index 26619560b42..25ecff97048 100644 --- a/dlls/dmsynth/tests/dmsynth.c +++ b/dlls/dmsynth/tests/dmsynth.c @@ -1036,19 +1036,19 @@ static void test_IDirectMusicSynth(void)
/* SetMasterClock does nothing */ hr = IDirectMusicSynth_SetMasterClock(synth, NULL); - todo_wine ok(hr == E_POINTER, "got %#lx\n", hr); + ok(hr == E_POINTER, "got %#lx\n", hr); hr = IDirectMusicSynth_SetMasterClock(synth, clock); ok(hr == S_OK, "got %#lx\n", hr); ref = get_refcount(clock); todo_wine ok(ref == 1, "got %lu\n", ref); hr = IDirectMusicSynth_Activate(synth, TRUE); - todo_wine ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr); + ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr);
/* SetMasterClock needs to be called on the sink */ hr = IDirectMusicSynthSink_SetMasterClock(sink, clock); ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicSynth_Activate(synth, TRUE); - todo_wine ok(hr == S_OK, "got %#lx\n", hr); + ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicSynth_Activate(synth, TRUE); ok(hr == S_FALSE, "got %#lx\n", hr);