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

@@ -52,8 +52,8 @@ class SoftwareMixer final : public Mixer {
unsigned volume;
public:
SoftwareMixer()
:Mixer(software_mixer_plugin),
SoftwareMixer(MixerListener &_listener)
:Mixer(software_mixer_plugin, _listener),
filter(CreateVolumeFilter()),
owns_filter(true),
volume(100)
@@ -86,10 +86,11 @@ public:
static Mixer *
software_mixer_init(gcc_unused EventLoop &event_loop,
gcc_unused AudioOutput &ao,
MixerListener &listener,
gcc_unused const config_param &param,
gcc_unused Error &error)
{
return new SoftwareMixer();
return new SoftwareMixer(listener);
}
bool