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; }
private void playFile() { resetTrackBar(); mainSoundEngine.RemoveAllSoundSources(); playingFile = mainSoundEngine.AddSoundSourceFromFile(playFileLocation); currentlyPlaying = mainSoundEngine.Play2D(playingFile.Name); trackBarIncrement = (int)playingFile.PlayLength / trackBarList.Count(); trackBarPos = 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). } }
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(); } }
//Stop all Sounds. public static void Stop() { Engine.RemoveAllSoundSources(); }
public override void Dispose() { soundEngine.StopAllSounds(); soundEngine.RemoveAllSoundSources(); soundEngine = null; }
/// <summary> /// Stops the player and removes it from memory /// </summary> public void destroyPlayer() { engine.RemoveAllSoundSources(); engine.Dispose(); }
protected override void DisposeInternal() { engine.StopAllSounds(); engine.RemoveAllSoundSources(); }