aboutsummaryrefslogtreecommitdiffstats
path: root/src/player_control.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/player_control.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/player_control.c b/src/player_control.c
index f20049484..2229efdf0 100644
--- a/src/player_control.c
+++ b/src/player_control.c
@@ -75,21 +75,27 @@ pc_play(struct song *song)
if (pc.state != PLAYER_STATE_STOP)
player_command(PLAYER_COMMAND_STOP);
+ assert(pc.next_song == NULL);
+
pc.next_song = song;
player_command(PLAYER_COMMAND_PLAY);
+ assert(pc.next_song == NULL);
+
idle_add(IDLE_PLAYER);
}
void pc_cancel(void)
{
player_command(PLAYER_COMMAND_CANCEL);
+ assert(pc.next_song == NULL);
}
void
pc_stop(void)
{
player_command(PLAYER_COMMAND_CLOSE_AUDIO);
+ assert(pc.next_song == NULL);
idle_add(IDLE_PLAYER);
}