Example #1
0
 public Sound(string fileName, bool looping, bool mute, float volume, SoundType type)
 {
     _smartSample = new SmartSample(MasterVolume.Instance, this, fileName);
     Looping      = looping;
     Mute         = mute;
     Volume       = volume;
     Type         = type;
 }
Example #2
0
        public Sound(string fileName, bool looping, bool mute, float volume, SoundType type)
        {
            try
            {
                _smartSample = new SmartSample(MasterVolume.Instance, this, fileName);
            }
            catch (Exception e)
            {
                throw new AudioLoadException($"Unable to load sound file '{fileName}'", e);
            }

            Looping = looping;
            Mute    = mute;
            Volume  = volume;
            Type    = type;
        }