Exemple #1
0
 public void Dispose()
 {
     if (FEngine != null)
     {
         FEngine.StopAllSounds();
         FEngine.RemoveAllSoundSources();
         FEngine = null;
     }
 }
 public void StopPlaying()
 {
     if (_sound != null && !_sound.Finished)
     {
         _sound.Stop();
     }
     if (IsPlaying)
     {
         _player.Stop();
     }
     try
     {
         _engine.RemoveAllSoundSources();
     }
     catch (Exception)
     {
         // We'll just ignore any errors on stopping the sounds (they probably aren't playing).
     }
     _engine.StopAllSounds();
     if (_sound != null)
     {
         _sound.Dispose();
     }
     _sound = null;
 }
Exemple #3
0
 private void playFile()
 {
     resetTrackBar();
     mainSoundEngine.RemoveAllSoundSources();
     playingFile       = mainSoundEngine.AddSoundSourceFromFile(playFileLocation);
     currentlyPlaying  = mainSoundEngine.Play2D(playingFile.Name);
     trackBarIncrement = (int)playingFile.PlayLength / trackBarList.Count();
     trackBarPos       = 0;
 }
Exemple #4
0
 public void Stop()
 {
     if (_soundPlaying != null)
     {
         _soundPlaying.Stop();
         _soundPlaying = null;
         _soundEngine.RemoveAllSoundSources();
         _soundEngine.StopAllSounds();
     }
 }
 public void StopPlaying()
 {
     if (IsPlaying)
     {
         OnPlaybackStopped(this, new StoppedEventArgs());
     }
     try
     {
         _engine.RemoveAllSoundSources();
     }
     catch (Exception)
     {
         // We'll just ignore any errors on stopping the sounds (they probably aren't playing).
     }
 }
Exemple #6
0
 public void Update(GameTime gameTime)
 {
     if ((int)map.Player.me.X >= minx && (int)map.Player.me.X <= maxx && (int)map.Player.me.Y >= miny && (int)map.Player.me.Y <= maxy)
     {
         onRoom = true;
         if (engine.IsCurrentlyPlaying("sounds/rooms/" + sound + ".mp3") == true)
         {
             return;
         }
         else
         {
             engine.Play2D("sounds/rooms/" + sound + ".mp3", true);
         }
     }
     else
     {
         onRoom = false;
         engine.RemoveAllSoundSources();
     }
 }
Exemple #7
0
 //Stop all Sounds.
 public static void Stop()
 {
     Engine.RemoveAllSoundSources();
 }
Exemple #8
0
 public override void Dispose()
 {
     soundEngine.StopAllSounds();
     soundEngine.RemoveAllSoundSources();
     soundEngine = null;
 }
Exemple #9
0
 /// <summary>
 /// Stops the player and removes it from memory
 /// </summary>
 public void destroyPlayer()
 {
     engine.RemoveAllSoundSources();
     engine.Dispose();
 }
Exemple #10
0
 protected override void DisposeInternal()
 {
     engine.StopAllSounds();
     engine.RemoveAllSoundSources();
 }