Commit 01d521e5 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

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=25728Signed-off-by: 's avatarAlistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: 's avatarMichael Stefaniuc <mstefani@winehq.org> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 649119b3
...@@ -445,16 +445,19 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_GetStartPoint(IDirectMusicSegment ...@@ -445,16 +445,19 @@ 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) {
if ((end || start) &&
(start >= This->header.mtLength || end > This->header.mtLength || start > end))
return DMUS_E_OUT_OF_RANGE; return DMUS_E_OUT_OF_RANGE;
}
This->header.mtLoopStart = mtStart; This->header.mtLoopStart = start;
This->header.mtLoopEnd = mtEnd; This->header.mtLoopEnd = end;
return S_OK; return S_OK;
} }
......
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