// Uninitializes the audio manager. public static void Uninitialize() { //sounds.Stop(); // Containment currentSong = null; }
// Plays the specified song. public static void PlaySong(Song song, bool looped, float volume, float pitch = 0.0f, float pan = 0.0f) { if (currentSong != null) { currentSong.Stop(); } currentSong = song; song.Play(looped, volume, pitch, pan); }
//----------------------------------------------------------------------------- // Playback //----------------------------------------------------------------------------- // Plays the specified song. public static void PlaySong(Song song, bool looped = true) { if (currentSong != null) { currentSong.Stop(); } currentSong = song; song.Play(looped); }
//----------------------------------------------------------------------------- // Initialization / Uninitialization //----------------------------------------------------------------------------- // Initializes the audio manager. public static void Initialize() { // Containment currentSong = null; // Playback masterVolume = 1.0f; masterPitch = 0.0f; masterPan = 0.0f; masterMuted = false; soundVolume = 1.0f; soundPitch = 0.0f; soundPan = 0.0f; soundMuted = false; musicVolume = 1.0f; musicPitch = 0.0f; musicPan = 0.0f; musicMuted = false; }
/** <summary> Uninitializes the audio manager. </summary> */ public static void Uninitialize() { //sounds.Stop(); // Containment currentSong = null; }
/** <summary> Plays the specified song. </summary> */ public static void PlaySong(Song song, bool looped, float volume, float pitch = 0.0f, float pan = 0.0f) { if (currentSong != null) currentSong.Stop(); currentSong = song; song.Play(looped, volume, pitch, pan); }
/** <summary> Plays the specified song. </summary> */ public static void PlaySong(Song song, bool looped = true) { if (currentSong != null) currentSong.Stop(); currentSong = song; song.Play(looped); }
/** <summary> Returns true if the song with the specified name is playing. </summary> */ public static bool IsSongPlaying(Song song) { return song.IsPlaying; }
/** <summary> Initializes the audio manager. </summary> */ public static void Initialize() { // Containment currentSong = null; // Playback masterVolume = 1.0f; masterPitch = 0.0f; masterPan = 0.0f; masterMuted = false; soundVolume = 1.0f; soundPitch = 0.0f; soundPan = 0.0f; soundMuted = false; musicVolume = 1.0f; musicPitch = 0.0f; musicPan = 0.0f; musicMuted = false; }
// Returns true if the song with the specified name is playing. public static bool IsSongPlaying(Song song) { return(song.IsPlaying); }