mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-18 10:31:42 +00:00
Loop point modulo by length
This commit is contained in:
parent
c18372dd06
commit
78b041800e
1 changed files with 5 additions and 0 deletions
|
@ -947,6 +947,11 @@ boolean I_SetMusicLoopPoint(UINT32 looppoint)
|
||||||
return false;
|
return false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
UINT32 length = I_GetMusicLength();
|
||||||
|
|
||||||
|
if (length > 0)
|
||||||
|
looppoint %= length;
|
||||||
|
|
||||||
loop_point = max((float)(looppoint / 1000.0L), 0);
|
loop_point = max((float)(looppoint / 1000.0L), 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue