summaryrefslogtreecommitdiff
path: root/src/Partition.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-05 23:20:33 +0100
committerMax Kellermann <max@duempel.org>2014-02-19 21:40:14 +0100
commit8d6fedf8177d0d2ced81e6d93d35c368b2ac69db (patch)
tree17890432eb5d7f6cbdf5feb32a0105dc6f9d8974 /src/Partition.hxx
parentf4f8fa7c947af10235d1cdd70b294a3b8810c6f4 (diff)
Mixer: add class MixerListener
Use a listener interface instead of GlobalEvents.
Diffstat (limited to 'src/Partition.hxx')
-rw-r--r--src/Partition.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Partition.hxx b/src/Partition.hxx
index 57dc9a5f4..cbdce2e86 100644
--- a/src/Partition.hxx
+++ b/src/Partition.hxx
@@ -22,6 +22,7 @@
#include "Playlist.hxx"
#include "output/MultipleOutputs.hxx"
+#include "mixer/Listener.hxx"
#include "PlayerControl.hxx"
struct Instance;
@@ -32,7 +33,7 @@ class SongLoader;
* A partition of the Music Player Daemon. It is a separate unit with
* a playlist, a player, outputs etc.
*/
-struct Partition {
+struct Partition final : private MixerListener {
Instance &instance;
struct playlist playlist;
@@ -46,6 +47,7 @@ struct Partition {
unsigned buffer_chunks,
unsigned buffered_before_play)
:instance(_instance), playlist(max_length),
+ outputs(*this),
pc(outputs, buffer_chunks, buffered_before_play) {}
void ClearQueue() {
@@ -188,6 +190,10 @@ struct Partition {
* Synchronize the player with the play queue.
*/
void SyncWithPlayer();
+
+private:
+ /* virtual methods from class MixerListener */
+ virtual void OnMixerVolumeChanged(Mixer &mixer, int volume) override;
};
#endif