dmime: IDirectMusicSegment8 SetLoopPoints support zero start/end.
Both end and start set to zero loop the whole segement. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=25728 Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
649119b30e
commit
01d521e5af
|
@ -445,17 +445,20 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_GetStartPoint(IDirectMusicSegment
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IDirectMusicSegment8Impl_SetLoopPoints(IDirectMusicSegment8 *iface,
|
static HRESULT WINAPI IDirectMusicSegment8Impl_SetLoopPoints(IDirectMusicSegment8 *iface,
|
||||||
MUSIC_TIME mtStart, MUSIC_TIME mtEnd)
|
MUSIC_TIME start, MUSIC_TIME end)
|
||||||
{
|
{
|
||||||
IDirectMusicSegment8Impl *This = impl_from_IDirectMusicSegment8(iface);
|
IDirectMusicSegment8Impl *This = impl_from_IDirectMusicSegment8(iface);
|
||||||
|
|
||||||
TRACE("(%p, %d, %d)\n", This, mtStart, mtEnd);
|
TRACE("(%p, %d, %d)\n", This, start, end);
|
||||||
if (mtStart >= This->header.mtLength || mtEnd > This->header.mtLength || mtStart > mtEnd) {
|
|
||||||
return DMUS_E_OUT_OF_RANGE;
|
if ((end || start) &&
|
||||||
}
|
(start >= This->header.mtLength || end > This->header.mtLength || start > end))
|
||||||
This->header.mtLoopStart = mtStart;
|
return DMUS_E_OUT_OF_RANGE;
|
||||||
This->header.mtLoopEnd = mtEnd;
|
|
||||||
return S_OK;
|
This->header.mtLoopStart = start;
|
||||||
|
This->header.mtLoopEnd = end;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IDirectMusicSegment8Impl_GetLoopPoints(IDirectMusicSegment8 *iface,
|
static HRESULT WINAPI IDirectMusicSegment8Impl_GetLoopPoints(IDirectMusicSegment8 *iface,
|
||||||
|
|
Loading…
Reference in New Issue