diff options
author | Max Kellermann <max@duempel.org> | 2009-10-08 21:22:31 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-10-08 21:22:31 +0200 |
commit | d6a6f428b3f9ddc13492951e2ed1699def516214 (patch) | |
tree | 4f71b8d8fd787261be882a6d030aed1a838a990b | |
parent | fd3934b8492190254351130be2f0f4c923b08ac3 (diff) | |
download | mpd-d6a6f428b3f9ddc13492951e2ed1699def516214.tar.gz mpd-d6a6f428b3f9ddc13492951e2ed1699def516214.tar.xz mpd-d6a6f428b3f9ddc13492951e2ed1699def516214.zip |
player_control: eliminate PLAYER_COMMAND_PLAY
Sending PLAYER_COMMAND_STOP followed by PLAYER_COMMAND_QUEUE does the
same. PLAYER_COMMAND_PLAY is redundant.
Diffstat (limited to '')
-rw-r--r-- | src/player_control.c | 3 | ||||
-rw-r--r-- | src/player_control.h | 1 | ||||
-rw-r--r-- | src/player_thread.c | 2 |
3 files changed, 1 insertions, 5 deletions
diff --git a/src/player_control.c b/src/player_control.c index 2229efdf0..38d960031 100644 --- a/src/player_control.c +++ b/src/player_control.c @@ -77,8 +77,7 @@ pc_play(struct song *song) assert(pc.next_song == NULL); - pc.next_song = song; - player_command(PLAYER_COMMAND_PLAY); + pc_enqueue_song(song); assert(pc.next_song == NULL); diff --git a/src/player_control.h b/src/player_control.h index a18120ca1..1acdb5686 100644 --- a/src/player_control.h +++ b/src/player_control.h @@ -35,7 +35,6 @@ enum player_command { PLAYER_COMMAND_NONE = 0, PLAYER_COMMAND_EXIT, PLAYER_COMMAND_STOP, - PLAYER_COMMAND_PLAY, PLAYER_COMMAND_PAUSE, PLAYER_COMMAND_SEEK, PLAYER_COMMAND_CLOSE_AUDIO, diff --git a/src/player_thread.c b/src/player_thread.c index b501937b6..412ae9b5e 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -347,7 +347,6 @@ static void player_process_command(struct player *player) { switch (pc.command) { case PLAYER_COMMAND_NONE: - case PLAYER_COMMAND_PLAY: case PLAYER_COMMAND_STOP: case PLAYER_COMMAND_EXIT: case PLAYER_COMMAND_CLOSE_AUDIO: @@ -773,7 +772,6 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg) while (1) { switch (pc.command) { - case PLAYER_COMMAND_PLAY: case PLAYER_COMMAND_QUEUE: assert(pc.next_song != NULL); |