hedgewars/uSound.pas
changeset 1562 c0eea030347b
parent 1225 f882a92ef872
child 1654 9cfa6f23e767
equal deleted inserted replaced
1561:f0af4e5fe880 1562:c0eea030347b
    81 end;
    81 end;
    82 
    82 
    83 procedure PlaySound(snd: TSound; infinite: boolean);
    83 procedure PlaySound(snd: TSound; infinite: boolean);
    84 var loops: LongInt;
    84 var loops: LongInt;
    85 begin
    85 begin
    86 if not isSoundEnabled then exit;
    86 if (not isSoundEnabled) or fastUntilLag then exit;
    87 if infinite then loops:= -1 else loops:= 0;
    87 if infinite then loops:= -1 else loops:= 0;
    88 Soundz[snd].lastChan:= Mix_PlayChannelTimed(-1, Soundz[snd].id, loops, -1)
    88 Soundz[snd].lastChan:= Mix_PlayChannelTimed(-1, Soundz[snd].id, loops, -1)
    89 end;
    89 end;
    90 
    90 
    91 procedure StopSound(snd: TSound);
    91 procedure StopSound(snd: TSound);