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:
parent
fd3934b849
commit
d6a6f428b3
@ -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 {
|
|||||||
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)
|
|||||||
{
|
{
|
||||||
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)
|
|||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user