Ejemplo n.º 1
0
 /// <summary>
 /// Cleans up the instance's resources.
 /// </summary>
 public static void cleanup()
 {
     if (s_instance != null)
     {
         s_instance.m_audio.Dispose();
         s_instance.m_waveBank.Dispose();
         s_instance.m_soundBank.Dispose();
     }
     s_instance = null;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Provides the instance of the class as per the Singleton pattern.
 /// </summary>
 /// <returns>The only instance of SoundEngine.</returns>
 public static SoundEngine getInstance()
 {
     if (s_instance == null)
     {
         s_instance = new SoundEngine();
     }
     return s_instance;
 }