admin 发表于 2018-4-23 07:20:10

SoundUtil.pas 修复声音 内存暴涨3KM2引擎

procedure PlaySound (idx: integer);
begin
try
    if (g_Sound <> nil) and g_boSound and(g_sound.effectCount<100) thenbegin//修改音乐同时播放数量 卡顿100-200
      if (idx >= 0) and (idx < g_SoundList.Count) then begin
      if g_SoundList <> '' then
          if FileExists (g_ParamDir+g_SoundList) then
            try
            g_Sound.EffectFile(g_ParamDir+g_SoundList, FALSE, FALSE);
            except
            end;
      end;
    end;
except

页: [1]
查看完整版本: SoundUtil.pas 修复声音 内存暴涨3KM2引擎