public string EffectFromInfo(SoundInfo info) { if (loadedSounds.ContainsKey(info.Name)) { return(info.Name); } ISoundEffect sound; if (info.Type == AudioType.Wav) { sound = new WavEffect(soundSystem, info.Path.Absolute, info.Loop, info.Volume); } else if (info.Type == AudioType.NSF) { sound = new NsfEffect(sfx, info.NsfTrack, info.Priority, info.Loop); } else { return(info.Name); } loadedSounds[info.Name] = sound; return(info.Name); }
public string EffectFromInfo(SoundInfo info) { if (loadedSounds.ContainsKey(info.Name)) return info.Name; ISoundEffect sound; if (info.Type == AudioType.Wav) { sound = new WavEffect(soundSystem, info.Path.Absolute, info.Loop, info.Volume); } else if (info.Type == AudioType.NSF) { sound = new NsfEffect(sfx, info.NsfTrack, info.Priority, info.Loop); } else return info.Name; loadedSounds[info.Name] = sound; return info.Name; }