Commit d6a6f428 authored by Max Kellermann's avatar Max Kellermann

player_control: eliminate PLAYER_COMMAND_PLAY

Sending PLAYER_COMMAND_STOP followed by PLAYER_COMMAND_QUEUE does the same. PLAYER_COMMAND_PLAY is redundant.
parent fd3934b8
...@@ -77,8 +77,7 @@ pc_play(struct song *song) ...@@ -77,8 +77,7 @@ pc_play(struct song *song)
assert(pc.next_song == NULL); assert(pc.next_song == NULL);
pc.next_song = song; pc_enqueue_song(song);
player_command(PLAYER_COMMAND_PLAY);
assert(pc.next_song == NULL); assert(pc.next_song == NULL);
......
...@@ -35,7 +35,6 @@ enum player_command { ...@@ -35,7 +35,6 @@ enum player_command {
PLAYER_COMMAND_NONE = 0, PLAYER_COMMAND_NONE = 0,
PLAYER_COMMAND_EXIT, PLAYER_COMMAND_EXIT,
PLAYER_COMMAND_STOP, PLAYER_COMMAND_STOP,
PLAYER_COMMAND_PLAY,
PLAYER_COMMAND_PAUSE, PLAYER_COMMAND_PAUSE,
PLAYER_COMMAND_SEEK, PLAYER_COMMAND_SEEK,
PLAYER_COMMAND_CLOSE_AUDIO, PLAYER_COMMAND_CLOSE_AUDIO,
......
...@@ -347,7 +347,6 @@ static void player_process_command(struct player *player) ...@@ -347,7 +347,6 @@ static void player_process_command(struct player *player)
{ {
switch (pc.command) { switch (pc.command) {
case PLAYER_COMMAND_NONE: case PLAYER_COMMAND_NONE:
case PLAYER_COMMAND_PLAY:
case PLAYER_COMMAND_STOP: case PLAYER_COMMAND_STOP:
case PLAYER_COMMAND_EXIT: case PLAYER_COMMAND_EXIT:
case PLAYER_COMMAND_CLOSE_AUDIO: case PLAYER_COMMAND_CLOSE_AUDIO:
...@@ -773,7 +772,6 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg) ...@@ -773,7 +772,6 @@ static gpointer player_task(G_GNUC_UNUSED gpointer arg)
while (1) { while (1) {
switch (pc.command) { switch (pc.command) {
case PLAYER_COMMAND_PLAY:
case PLAYER_COMMAND_QUEUE: case PLAYER_COMMAND_QUEUE:
assert(pc.next_song != NULL); assert(pc.next_song != NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment