Example #1
0
        // Uninitializes the audio manager.
        public static void Uninitialize()
        {
            //sounds.Stop();

            // Containment
            currentSong = null;
        }
Example #2
0
        // 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);
        }
Example #3
0
        //-----------------------------------------------------------------------------
        // Playback
        //-----------------------------------------------------------------------------

        // Plays the specified song.
        public static void PlaySong(Song song, bool looped = true)
        {
            if (currentSong != null)
            {
                currentSong.Stop();
            }

            currentSong = song;
            song.Play(looped);
        }
Example #4
0
        //-----------------------------------------------------------------------------
        // 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;
        }
Example #5
0
        /** <summary> Uninitializes the audio manager. </summary> */
        public static void Uninitialize()
        {
            //sounds.Stop();

            // Containment
            currentSong		= null;
        }
Example #6
0
        /** <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);
        }
Example #7
0
        /** <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);
        }
Example #8
0
 /** <summary> Returns true if the song with the specified name is playing. </summary> */
 public static bool IsSongPlaying(Song song)
 {
     return song.IsPlaying;
 }
Example #9
0
        /** <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;
        }
Example #10
0
 // Returns true if the song with the specified name is playing.
 public static bool IsSongPlaying(Song song)
 {
     return(song.IsPlaying);
 }