protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _engine.Dispose();
     }
 }
예제 #2
0
 public void Dispose()
 {
     _engine.Dispose();
     _recorder.Dispose();
     if (_sound != null)
     {
         _sound.Dispose();
         _sound = null;
     }
 }
예제 #3
0
파일: Player.cs 프로젝트: XProduct/lyd
 private void Dispose(bool isCleanAll)
 {
     if (isCleanAll)
     {
         engine.Dispose();
         GC.SuppressFinalize(this);
     }
     else
     {
         // Clean Managed Resources
     }
 }
예제 #4
0
        public void Dispose()
        {
            StopAudio();
            if (sounds != null)
            {
                foreach (var soundSource in sounds.Values)
                {
                    soundSource?.Dispose();
                }
            }

            soundEngine.Dispose();
        }
예제 #5
0
 private void StopAllSounds()
 {
     fadeOut(PitLane);
     fadeOut(Crowd);
     fadeOut(EnvAmbience);
     fadeOut(Announcer);
     fadeOut(Guns);
     fadeOut(Siren);
     fadeOut(Repair);
     fadeOut(Music);
     fadeOut(Fueling);
     Engine.StopAllSounds();
     Engine.Dispose();
 }
예제 #6
0
        // The bulk of the clean-up code is implemented in Dispose(bool)
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // free managed resources
                if (_currentPlayback != null)
                {
                    _currentPlayback.Stop();
                    _currentPlayback.Dispose();
                    _currentPlayback = null;
                }

                if (_engine != null)
                {
                    _engine.Dispose();
                    _engine = null;
                }
            }
        }
예제 #7
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }

            if (disposing)
            {
                if (soundEngine != null)
                {
                    soundEngine.Dispose();
                }

                if (musicEngine != null)
                {
                    musicEngine.Dispose();
                }
            }

            disposed = true;
        }
예제 #8
0
 public void Dispose()
 {
     Engine.Dispose();
 }
예제 #9
0
파일: IrrklangPlayer.cs 프로젝트: mo-g/ags
 public void Dispose()
 {
     _soundEngine.Dispose();
 }
예제 #10
0
 public void Dispose()
 {
     stream.Dispose();
     engine.Dispose();
 }
예제 #11
0
 public static void DisposeSoundEngine()
 {
     SoundEngine.StopAllSounds();
     SoundEngine.Dispose();
 }
예제 #12
0
 static public void stop()
 {
     bgm.StopAllSounds();
     bgm.Dispose();
     bgm = new ISoundEngine();
 }
예제 #13
0
 /// <summary>
 /// Stops the player and removes it from memory
 /// </summary>
 public void destroyPlayer()
 {
     engine.RemoveAllSoundSources();
     engine.Dispose();
 }