Пример #1
0
 /// <summary>
 /// Cleans up the instance's resources.
 /// </summary>
 public static void cleanup()
 {
     if (instance_ != null)
     {
         instance_.audio_.Dispose();
         instance_.waveBank_.Dispose();
         instance_.soundBank_.Dispose();
     }
     instance_ = null;
 }
Пример #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 (instance_ == null)
     {
         instance_ = new SoundEngine();
     }
     return instance_;
 }