private void TogglePlayPause(bool isPaused) { if (!isPaused) { // Session.Pause(); playbackManager.Pause(); _output.OutputMessage(StringStore.Paused); } else { // Session.Play(); playbackManager.Play(); _output.OutputMessage(StringStore.Playing); } }
public override void Execute(object sender, HandledEventArgs e) { if (!playbackManager.IsPaused) { // Session.Pause(); playbackManager.Pause(); } else { // Session.Play(); playbackManager.Play(); } }
private void PlayTrackBufferItem(TrackBufferItem item) { var response = Session.LoadPlayer(item.Model.TrackPtr); if (response.IsError && !settings.SkipUnplayableTracks) { output.OutputMessage(StringStore.UnableToPlayTrack + response.Message, false); return; } if (response.IsError && settings.SkipUnplayableTracks) { HandleEndOfCurrentTrack(); return; // don't carry on with this, as it got handled in a recursive call } Session.Play(); playbackManager.PlayingTrack = item.Model; playbackManager.fullyDownloaded = false; playbackManager.Play(); output.OutputTrackModel(playbackManager.PlayingTrack, settings.OutputTrackChangesGraphically, settings.OutputTrackChangesWithSpeech); }
private void PlayNewTrackBufferItem(TrackBufferItem item) { var output = OutputManager.Instance; var settings = UserSettings.Instance; var response = Session.LoadPlayer(item.Model.TrackPtr); if (response.IsError && !settings.SkipUnplayableTracks) { output.OutputMessage(StringStore.UnableToPlayTrack + response.Message, false); return; } if (response.IsError && settings.SkipUnplayableTracks) { // move to next track again Execute(this, new HandledEventArgs()); return; } Session.Play(); playbackManager.PlayingTrack = item.Model; playbackManager.fullyDownloaded = false; playbackManager.Play(); output.OutputTrackModel(playbackManager.PlayingTrack, settings.OutputTrackChangesGraphically, settings.OutputTrackChangesWithSpeech); }