diff options
author | Max Kellermann <max@duempel.org> | 2013-09-27 07:58:48 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-27 07:58:48 +0200 |
commit | ada67a6a4ff53bef4d874eafea83272eac8e18f1 (patch) | |
tree | 4687c92b75f5de8f8f44f3a19affb1d047b4c191 /src/PlayerControl.hxx | |
parent | b6a5d1ad5a52063fcd846951367a5c39f4b34196 (diff) | |
download | mpd-ada67a6a4ff53bef4d874eafea83272eac8e18f1.tar.gz mpd-ada67a6a4ff53bef4d874eafea83272eac8e18f1.tar.xz mpd-ada67a6a4ff53bef4d874eafea83272eac8e18f1.zip |
PlayerThread: move code to player_control::CommandFinished()
Diffstat (limited to 'src/PlayerControl.hxx')
-rw-r--r-- | src/PlayerControl.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/PlayerControl.hxx b/src/PlayerControl.hxx index 498f91143..4134cc08c 100644 --- a/src/PlayerControl.hxx +++ b/src/PlayerControl.hxx @@ -229,6 +229,20 @@ struct player_control { } /** + * A command has been finished. This method clears the + * command and signals the client. + * + * To be called from the player thread. Caller must lock the + * object. + */ + void CommandFinished() { + assert(command != PLAYER_COMMAND_NONE); + + command = PLAYER_COMMAND_NONE; + ClientSignal(); + } + + /** * @param song the song to be queued; the given instance will * be owned and freed by the player */ |