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

dmime: Implement some segment state default values.

parent 94386b4f
......@@ -78,38 +78,46 @@ static ULONG WINAPI segment_state_Release(IDirectMusicSegmentState8 *iface)
return ref;
}
static HRESULT WINAPI segment_state_GetRepeats(IDirectMusicSegmentState8 *iface, DWORD *pdwRepeats)
static HRESULT WINAPI segment_state_GetRepeats(IDirectMusicSegmentState8 *iface, DWORD *repeats)
{
struct segment_state *This = impl_from_IDirectMusicSegmentState8(iface);
FIXME("(%p, %p): stub\n", This, pdwRepeats);
FIXME("(%p, %p): semi-stub\n", This, repeats);
return S_OK;
}
static HRESULT WINAPI segment_state_GetSegment(IDirectMusicSegmentState8 *iface, IDirectMusicSegment **ppSegment)
static HRESULT WINAPI segment_state_GetSegment(IDirectMusicSegmentState8 *iface, IDirectMusicSegment **segment)
{
struct segment_state *This = impl_from_IDirectMusicSegmentState8(iface);
FIXME("(%p, %p): stub\n", This, ppSegment);
return S_OK;
FIXME("(%p, %p): semi-stub\n", This, segment);
*segment = NULL;
return DMUS_E_NOT_FOUND;
}
static HRESULT WINAPI segment_state_GetStartTime(IDirectMusicSegmentState8 *iface, MUSIC_TIME *pmtStart)
static HRESULT WINAPI segment_state_GetStartTime(IDirectMusicSegmentState8 *iface, MUSIC_TIME *start_time)
{
struct segment_state *This = impl_from_IDirectMusicSegmentState8(iface);
FIXME("(%p, %p): stub\n", This, pmtStart);
FIXME("(%p, %p): semi-stub\n", This, start_time);
*start_time = -1;
return S_OK;
}
static HRESULT WINAPI segment_state_GetSeek(IDirectMusicSegmentState8 *iface, MUSIC_TIME *pmtSeek)
static HRESULT WINAPI segment_state_GetSeek(IDirectMusicSegmentState8 *iface, MUSIC_TIME *seek_time)
{
struct segment_state *This = impl_from_IDirectMusicSegmentState8(iface);
FIXME("(%p, %p): stub\n", This, pmtSeek);
FIXME("(%p, %p): semi-stub\n", This, seek_time);
*seek_time = 0;
return S_OK;
}
static HRESULT WINAPI segment_state_GetStartPoint(IDirectMusicSegmentState8 *iface, MUSIC_TIME *pmtStart)
static HRESULT WINAPI segment_state_GetStartPoint(IDirectMusicSegmentState8 *iface, MUSIC_TIME *start_time)
{
struct segment_state *This = impl_from_IDirectMusicSegmentState8(iface);
FIXME("(%p, %p): stub\n", This, pmtStart);
FIXME("(%p, %p): semi-stub\n", This, start_time);
*start_time = 0;
return S_OK;
}
......
......@@ -3985,12 +3985,12 @@ static void test_segment_state(void)
tmp_segment = (void *)0xdeadbeef;
hr = IDirectMusicSegmentState_GetSegment(state, &tmp_segment);
todo_wine ok(hr == DMUS_E_NOT_FOUND, "got %#lx\n", hr);
todo_wine ok(tmp_segment == NULL, "got %p\n", tmp_segment);
ok(hr == DMUS_E_NOT_FOUND, "got %#lx\n", hr);
ok(tmp_segment == NULL, "got %p\n", tmp_segment);
time = 0xdeadbeef;
hr = IDirectMusicSegmentState_GetStartPoint(state, &time);
ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(time == 0, "got %#lx\n", time);
ok(time == 0, "got %#lx\n", time);
time = 0xdeadbeef;
hr = IDirectMusicSegmentState_GetRepeats(state, &value);
ok(hr == S_OK, "got %#lx\n", hr);
......@@ -3998,11 +3998,11 @@ static void test_segment_state(void)
time = 0xdeadbeef;
hr = IDirectMusicSegmentState_GetStartTime(state, &time);
ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(time == -1, "got %#lx\n", time);
ok(time == -1, "got %#lx\n", time);
time = 0xdeadbeef;
hr = IDirectMusicSegmentState_GetSeek(state, &time);
ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(time == 0, "got %#lx\n", time);
ok(time == 0, "got %#lx\n", time);
/* PlaySegment returns a different, genuine segment state */
......@@ -4043,9 +4043,9 @@ static void test_segment_state(void)
tmp_segment = (void *)0xdeadbeef;
hr = IDirectMusicSegmentState_GetSegment(state, &tmp_segment);
ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(hr == S_OK, "got %#lx\n", hr);
todo_wine ok(tmp_segment == segment, "got %p\n", tmp_segment);
if (tmp_segment != (void *)0xdeadbeef) IDirectMusicSegment_Release(tmp_segment);
if (tmp_segment) IDirectMusicSegment_Release(tmp_segment);
time = 0xdeadbeef;
hr = IDirectMusicSegmentState_GetStartPoint(state, &time);
......
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