public static void PlaySound(string soundName, float volume) { var filename = $"Content/Sounds/{ soundName }.mp3"; var input = new DisposingFileReader(new AudioFileReader(filename)); AudioPlaybackEngine.Instance.Play(input); }
public static void PlaySound(string soundName, float volume) { var filename = $"Content/Sounds/{ soundName }.mp3"; var input = new DisposingFileReader(new AudioFileReader(filename)); if (_musicTrack != null) { _musicTrack.AddDampener(); input.Disposed += sound_Disposed; } AudioPlaybackEngine.Instance.Play(input); }