diff options
author | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:17 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-08-26 08:27:17 +0200 |
commit | 110cef6fda704ae9ea806c13ef346de6a1059a9f (patch) | |
tree | 2416856ed2f404f8e031b4932454d97a038ba100 /src/player.c | |
parent | 7125fdc4f24176997e68e5e6923ca6df685cf159 (diff) | |
download | mpd-110cef6fda704ae9ea806c13ef346de6a1059a9f.tar.gz mpd-110cef6fda704ae9ea806c13ef346de6a1059a9f.tar.xz mpd-110cef6fda704ae9ea806c13ef346de6a1059a9f.zip |
don't call playerStop() before playerPlay()
Since playerPlay() already calls playerStop(), we can remove its
invocation of playerStop() from playPlaylistOrderNumber().
We can also make playerStop a static function.
Diffstat (limited to '')
-rw-r--r-- | src/player.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/player.c b/src/player.c index 6a2c3a08e..4de92fb8e 100644 --- a/src/player.c +++ b/src/player.c @@ -53,20 +53,15 @@ void player_command_finished() void playerPlay(Song * song) { - playerStop(); - - set_current_song(song); - player_command(PLAYER_COMMAND_PLAY); -} - -void playerStop(void) -{ assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED); if (pc.state != PLAYER_STATE_STOP) player_command(PLAYER_COMMAND_STOP); pc.queueState = PLAYER_QUEUE_BLANK; + + set_current_song(song); + player_command(PLAYER_COMMAND_PLAY); } void playerWait(void) |