Mixer: add class MixerListener

Use a listener interface instead of GlobalEvents.
This commit is contained in:
Max Kellermann
2014-02-05 23:20:33 +01:00
parent f4f8fa7c94
commit 8d6fedf817
24 changed files with 144 additions and 74 deletions

View File

@@ -25,10 +25,14 @@
#include "thread/Mutex.hxx"
#include "Compiler.h"
class MixerListener;
class Mixer {
public:
const MixerPlugin &plugin;
MixerListener &listener;
/**
* This mutex protects all of the mixer struct, including its
* implementation, so plugins don't have to deal with that.
@@ -47,8 +51,8 @@ public:
bool failed;
public:
explicit Mixer(const MixerPlugin &_plugin)
:plugin(_plugin),
explicit Mixer(const MixerPlugin &_plugin, MixerListener &_listener)
:plugin(_plugin), listener(_listener),
open(false),
failed(false) {}