diff options
author | Max Kellermann <max@duempel.org> | 2014-02-21 08:55:52 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-21 10:22:35 +0100 |
commit | 30a82076ba50a21c4df5fe4c46c8fc2ed25a7486 (patch) | |
tree | 6d7f28eb99c4e708d7b7609a203f78d565475c89 /src/Partition.hxx | |
parent | 860339c132f76ae6710b2d96851b3f55a273c1da (diff) |
PlayerListener: new interface to replace GlobalEvents access
Diffstat (limited to 'src/Partition.hxx')
-rw-r--r-- | src/Partition.hxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Partition.hxx b/src/Partition.hxx index cbdce2e86..991234a50 100644 --- a/src/Partition.hxx +++ b/src/Partition.hxx @@ -24,6 +24,7 @@ #include "output/MultipleOutputs.hxx" #include "mixer/Listener.hxx" #include "PlayerControl.hxx" +#include "PlayerListener.hxx" struct Instance; class MultipleOutputs; @@ -33,7 +34,7 @@ class SongLoader; * A partition of the Music Player Daemon. It is a separate unit with * a playlist, a player, outputs etc. */ -struct Partition final : private MixerListener { +struct Partition final : private PlayerListener, private MixerListener { Instance &instance; struct playlist playlist; @@ -48,7 +49,7 @@ struct Partition final : private MixerListener { unsigned buffered_before_play) :instance(_instance), playlist(max_length), outputs(*this), - pc(outputs, buffer_chunks, buffered_before_play) {} + pc(*this, outputs, buffer_chunks, buffered_before_play) {} void ClearQueue() { playlist.Clear(pc); @@ -192,6 +193,10 @@ struct Partition final : private MixerListener { void SyncWithPlayer(); private: + /* virtual methods from class PlayerListener */ + virtual void OnPlayerSync() override; + virtual void OnPlayerTagModified() override; + /* virtual methods from class MixerListener */ virtual void OnMixerVolumeChanged(Mixer &mixer, int volume) override; }; |