player_control: eliminate PLAYER_COMMAND_PLAY

Sending PLAYER_COMMAND_STOP followed by PLAYER_COMMAND_QUEUE does the
same.  PLAYER_COMMAND_PLAY is redundant.
This commit is contained in:
Max Kellermann 2009-10-08 21:22:31 +02:00
parent fd3934b849
commit d6a6f428b3
3 changed files with 1 additions and 5 deletions

View File

@ -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);

View File

@ -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,

View File

@ -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);