[banshee/stable-2.6] Gapless: fix smooth transition for RepeatSingle mode (bgo#627391)
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee/stable-2.6] Gapless: fix smooth transition for RepeatSingle mode (bgo#627391)
- Date: Mon, 17 Feb 2014 23:14:54 +0000 (UTC)
commit cef493839f4a9a3c5ffdd06926c96d6110bb867a
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Tue Feb 18 00:02:40 2014 +0100
Gapless: fix smooth transition for RepeatSingle mode (bgo#627391)
RepeatSingle mode was setting the next track with OpenPlay() instead
of using SetNextTrack() when receiving the RequestNextTrack event,
which meant that the track to play next was not received in time*,
and therefore not succeed in making the transition gapless.
* The consequence of this was the following debug message:
[23 Debug 21:47:47.275] [Gapless] Timed out while waiting for next_track_set to be raised
.../PlaybackControllerService.cs | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
b/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
index 19a649a..1b8020f 100644
--- a/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
+++ b/src/Core/Banshee.Services/Banshee.PlaybackController/PlaybackControllerService.cs
@@ -31,7 +31,6 @@ using System;
using Hyena;
using Hyena.Collections;
-using Banshee.Base;
using Banshee.Sources;
using Banshee.ServiceStack;
using Banshee.Collection;
@@ -194,7 +193,7 @@ namespace Banshee.PlaybackController
{
if (!StopWhenFinished) {
if (RepeatMode == PlaybackRepeatMode.RepeatSingle) {
- QueuePlayTrack ();
+ RepeatCurrentAsNext ();
} else {
last_was_skipped = false;
Next (RepeatMode == PlaybackRepeatMode.RepeatAll, false);
@@ -207,6 +206,15 @@ namespace Banshee.PlaybackController
return false;
}
+ private void RepeatCurrentAsNext ()
+ {
+ raise_started_after_transition = true;
+
+ player_engine.SetNextTrack (CurrentTrack);
+
+ OnTransition ();
+ }
+
public void First ()
{
CancelErrorTransition ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]