equal
deleted
inserted
replaced
313 WriteToConsole('Init SDL_mixer... '); |
313 WriteToConsole('Init SDL_mixer... '); |
314 SDLTry(Mix_Init(MIX_INIT_OGG) <> 0, true); |
314 SDLTry(Mix_Init(MIX_INIT_OGG) <> 0, true); |
315 WriteLnToConsole(msgOK); |
315 WriteLnToConsole(msgOK); |
316 |
316 |
317 Mix_AllocateChannels(Succ(chanTPU)); |
317 Mix_AllocateChannels(Succ(chanTPU)); |
318 ChangeVolume(cInitVolume); |
318 ChangeVolume(cInitVolume); |
319 end; |
319 end; |
320 |
320 |
321 procedure ResetSound; |
321 procedure ResetSound; |
322 begin |
322 begin |
323 isSoundEnabled:= isSEBackup; |
323 isSoundEnabled:= isSEBackup; |
450 if (not isSoundEnabled) or fastUntilLag or ((LastVoice.snd <> sndNone) and (lastChan[LastVoice.snd] <> -1) and (Mix_Playing(lastChan[LastVoice.snd]) <> 0)) then |
450 if (not isSoundEnabled) or fastUntilLag or ((LastVoice.snd <> sndNone) and (lastChan[LastVoice.snd] <> -1) and (Mix_Playing(lastChan[LastVoice.snd]) <> 0)) then |
451 exit; |
451 exit; |
452 i:= 0; |
452 i:= 0; |
453 while (i<High(VoiceList)) and (VoiceList[i].snd = sndNone) do |
453 while (i<High(VoiceList)) and (VoiceList[i].snd = sndNone) do |
454 inc(i); |
454 inc(i); |
455 |
455 |
456 if (VoiceList[i].snd <> sndNone) then |
456 if (VoiceList[i].snd <> sndNone) then |
457 begin |
457 begin |
458 LastVoice.snd:= VoiceList[i].snd; |
458 LastVoice.snd:= VoiceList[i].snd; |
459 LastVoice.voicepack:= VoiceList[i].voicepack; |
459 LastVoice.voicepack:= VoiceList[i].voicepack; |
460 VoiceList[i].snd:= sndNone; |
460 VoiceList[i].snd:= sndNone; |