aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-25 08:44:31 +0200
committerMax Kellermann <max@duempel.org>2012-08-25 09:38:41 +0200
commitf351550534939478d7ddc791dc76aafd5f2a3503 (patch)
tree3672f6b43ee97f00ba7812cdfce92dda2c901437 /src/player_control.c
parent66ecf39efe703185b1d54775e052d1c6a3f76903 (diff)
downloadmpd-f351550534939478d7ddc791dc76aafd5f2a3503.tar.gz
mpd-f351550534939478d7ddc791dc76aafd5f2a3503.tar.xz
mpd-f351550534939478d7ddc791dc76aafd5f2a3503.zip
player_thread: disable cross-fading in "single" mode
This commit reimplements the core of the "single" mode. Instead of doing the detection in the playlist code from the outside, it is moved to the player thread, which gets a new option called "border_pause". It will now pause playback exactly at the beginning of the new song, making the feature more reliable. Now that the player thread knows what will happen, it can suppress cross-fading. Fixes mantis tickets 0003055 and 0003166.
Diffstat (limited to '')
-rw-r--r--src/player_control.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/player_control.c b/src/player_control.c
index d8d54dfd6..90f616d77 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -211,6 +211,14 @@ pc_set_pause(struct player_control *pc, bool pause_flag)
}
void
+pc_set_border_pause(struct player_control *pc, bool border_pause)
+{
+ player_lock(pc);
+ pc->border_pause = border_pause;
+ player_unlock(pc);
+}
+
+void
pc_get_status(struct player_control *pc, struct player_status *status)
{
player_lock(pc);