equal
deleted
inserted
replaced
154 |
154 |
155 procedure PlaySound(snd: TSound; infinite: boolean; voicepack: PVoicepack); |
155 procedure PlaySound(snd: TSound; infinite: boolean; voicepack: PVoicepack); |
156 var loops: LongInt; |
156 var loops: LongInt; |
157 begin |
157 begin |
158 if (not isSoundEnabled) or fastUntilLag then exit; |
158 if (not isSoundEnabled) or fastUntilLag then exit; |
|
159 if infinite and (lastChan[snd] <> -1) then exit; |
159 if infinite then loops:= -1 else loops:= 0; |
160 if infinite then loops:= -1 else loops:= 0; |
160 |
161 |
161 if (voicepack <> nil) and (voicepack^.chunks[snd] <> nil) then |
162 if (voicepack <> nil) and (voicepack^.chunks[snd] <> nil) then |
162 lastChan[snd]:= Mix_PlayChannelTimed(-1, voicepack^.chunks[snd], loops, -1) |
163 lastChan[snd]:= Mix_PlayChannelTimed(-1, voicepack^.chunks[snd], loops, -1) |
163 else |
164 else |