Beispiel #1
0
 public static void Stop()
 {
     // Para a música que está tocando
     if (Device != null && Current != 0)
     {
         Device.Stop();
         Device.Dispose();
         Device = null;
     }
 }
        public void Dispose()
        {
            Logger.WriteLine(Logger.Stage.CLEAN_SOUND, "disposing SFMLMusicManager...");
            foreach (string musicname in m_Musics.Keys)
            {
                SFMLMusic music = m_Musics[musicname];
                if (music == null)
                {
                    Logger.WriteLine(Logger.Stage.CLEAN_SOUND, String.Format("WARNING: null music for key {0}", musicname));
                    continue;
                }
                Logger.WriteLine(Logger.Stage.CLEAN_SOUND, String.Format("disposing music {0}.", musicname));
                music.Dispose();
            }

            m_Musics.Clear();
            Logger.WriteLine(Logger.Stage.CLEAN_SOUND, "disposing SFMLMusicManager done.");
        }
Beispiel #3
0
 /// <summary>
 /// Dispose the music. (I don't think this works right now.)
 /// </summary>
 public void Dispose()
 {
     musics.Remove(this);
     music.Dispose();
     music = null;
 }