Commit be2cdd3c authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dmsynth: Implement IDirectMusicSynthSink_SetDirectSound semi-stub.

parent d3b19150
......@@ -34,6 +34,7 @@ struct synth_sink
IReferenceClock *latency_clock;
IReferenceClock *master_clock;
IDirectMusicSynth *synth; /* No reference hold! */
IDirectSound *dsound;
BOOL active;
};
......@@ -181,7 +182,17 @@ static HRESULT WINAPI synth_sink_SetDirectSound(IDirectMusicSynthSink *iface,
{
struct synth_sink *This = impl_from_IDirectMusicSynthSink(iface);
FIXME("(%p)->(%p, %p): stub\n", This, dsound, dsound_buffer);
TRACE("(%p)->(%p, %p)\n", This, dsound, dsound_buffer);
if (dsound_buffer) FIXME("Ignoring IDirectSoundBuffer parameter.\n");
if (This->active) return DMUS_E_SYNTHACTIVE;
if (This->dsound) IDirectSound_Release(This->dsound);
This->dsound = NULL;
if (!dsound) return S_OK;
if (!This->synth) return DMUS_E_SYNTHNOTCONFIGURED;
if ((This->dsound = dsound)) IDirectSound_AddRef(This->dsound);
return S_OK;
}
......
......@@ -1234,7 +1234,7 @@ static void test_IDirectMusicSynthSink(void)
hr = IDirectMusicSynthSink_SetDirectSound(sink, NULL, NULL);
ok(hr == S_OK, "got %#lx\n", hr);
hr = IDirectMusicSynthSink_SetDirectSound(sink, dsound, NULL);
todo_wine ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr);
ok(hr == DMUS_E_SYNTHNOTCONFIGURED, "got %#lx\n", hr);
/* Activate requires a synth, dsound and a clock */
ref = get_refcount(synth);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment