hedgewars/uSound.pas
changeset 11663 0427a9b6457b
parent 11532 bf86c6cb9341
child 11766 abcdb7bc2620
equal deleted inserted replaced
11662:97a4188fc99e 11663:0427a9b6457b
   423         if (defVoicepack^.chunks[snd] = nil) and (Soundz[snd].Path <> ptVoices) and (Soundz[snd].FileName <> '') then
   423         if (defVoicepack^.chunks[snd] = nil) and (Soundz[snd].Path <> ptVoices) and (Soundz[snd].FileName <> '') then
   424             begin
   424             begin
   425             s:= cPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName;
   425             s:= cPathz[Soundz[snd].Path] + '/' + Soundz[snd].FileName;
   426             WriteToConsole(msgLoading + s + ' ');
   426             WriteToConsole(msgLoading + s + ' ');
   427             defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(rwopsOpenRead(s), 1);
   427             defVoicepack^.chunks[snd]:= Mix_LoadWAV_RW(rwopsOpenRead(s), 1);
   428             if not SDLCheck(defVoicepack^.chunks[snd] <> nil, 'Mix_LoadWAV_RW', true) then exit;
   428             if SDLCheck(defVoicepack^.chunks[snd] <> nil, 'Mix_LoadWAV_RW', true) then exit;
   429             WriteLnToConsole(msgOK);
   429             WriteLnToConsole(msgOK);
   430             end;
   430             end;
   431         lastChan[snd]:= Mix_PlayChannelTimed(-1, defVoicepack^.chunks[snd], 0, -1)
   431         lastChan[snd]:= Mix_PlayChannelTimed(-1, defVoicepack^.chunks[snd], 0, -1)
   432         end;
   432         end;
   433 end;
   433 end;