/// <summary> /// Pauses the current song. /// </summary> public void pause() { if (getSongState() == SongState.Playing || getSongState() == SongState.Stopped) { this.dynamicSound.Pause(); this.songState = SongState.Paused; } }
/// <summary> /// Resume the current song from being paused. /// </summary> public void resume() { if (this.dynamicSound != null) { if (getSongState() == SongState.Stopped || getSongState() == SongState.Paused) { this.dynamicSound.Resume(); this.songState = SongState.Playing; } } }
/// <summary> /// Stop the currently playing song. /// </summary> public void stop() { if (this.dynamicSound != null) { if (this.songState == SongState.Playing || this.songState == SongState.Paused) { this.dynamicSound.Stop(); this.songState = SongState.Stopped; } } }