OpenTkEngine.Core.Assets.LoadSound C# (CSharp) Method

LoadSound() public static method

public static LoadSound ( string filename ) : bool
filename string
return bool
        public static bool LoadSound(string filename)
        {
            if (!_sounds.ContainsKey(filename))
            {
                try
                {
                    Sound sound = new Sound(ASSETS + AUDIO + filename);
                    _sounds.Add(filename, sound);
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    return false;
                }
            }
            else
                Console.WriteLine("a audio file already exists with the filename: " + filename);
            return true;
        }