summaryrefslogtreecommitdiff
path: root/src/decoder/DecoderControl.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-12-31 13:06:31 +0100
committerMax Kellermann <max@duempel.org>2015-12-31 13:06:31 +0100
commit650799397291b6f5e4d892e33d33ed461caa8f87 (patch)
tree1c8a8c2d15d8a331234a298a6bce673c3c2e3bd0 /src/decoder/DecoderControl.hxx
parentf081696f620b6e2f2c18056412c7bf2c2832d401 (diff)
decoder/Thread: move decoder_command_finished_locked() to DecoderControl
Diffstat (limited to 'src/decoder/DecoderControl.hxx')
-rw-r--r--src/decoder/DecoderControl.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/decoder/DecoderControl.hxx b/src/decoder/DecoderControl.hxx
index 4147f5acc..35bd6828e 100644
--- a/src/decoder/DecoderControl.hxx
+++ b/src/decoder/DecoderControl.hxx
@@ -351,6 +351,20 @@ private:
public:
/**
+ * Marks the current command as "finished" and notifies the
+ * client (= player thread).
+ *
+ * To be called from the decoder thread. Caller must lock the
+ * mutex.
+ */
+ void CommandFinishedLocked() {
+ assert(command != DecoderCommand::NONE);
+
+ command = DecoderCommand::NONE;
+ client_cond.signal();
+ }
+
+ /**
* Start the decoder.
*
* @param song the song to be decoded; the given instance will be