This repository has been archived on 2024-06-21. You can view files and clone it, but cannot push or open issues or pull requests.
CDSAE3/CDSAE3_Lian_Lian_Kan/Sound/Audio_res_manager.cs

27 lines
730 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CDSAE3_Lian_Lian_Kan.Sound
{
public class Audio_res_manager
{
Dictionary<string, byte[]> audio_res = new Dictionary<string, byte[]>();
internal byte[] Get_Audio_Resources(string name)
{
if(audio_res.TryGetValue(name, out byte[]? val))
return val;
object obj = Etcs.res_Manager.GetObject(name, Etcs.res_Culture)!;
byte[] res = (byte[])obj;
audio_res.Add(name, res);
return res;
}
internal void Clear_Audio_Resources()
{
audio_res.Clear();
}
}
}