Mixer: add class MixerListener
Use a listener interface instead of GlobalEvents.
This commit is contained in:
		| @@ -22,7 +22,6 @@ | ||||
| #include "mixer/MixerList.hxx" | ||||
| #include "filter/FilterRegistry.hxx" | ||||
| #include "pcm/Volume.hxx" | ||||
| #include "GlobalEvents.hxx" | ||||
| #include "Main.hxx" | ||||
| #include "event/Loop.hxx" | ||||
| #include "config/ConfigData.hxx" | ||||
| @@ -35,11 +34,6 @@ | ||||
| #include <string.h> | ||||
| #include <unistd.h> | ||||
|  | ||||
| void | ||||
| GlobalEvents::Emit(gcc_unused Event event) | ||||
| { | ||||
| } | ||||
|  | ||||
| const struct filter_plugin * | ||||
| filter_plugin_by_name(gcc_unused const char *name) | ||||
| { | ||||
| @@ -65,6 +59,7 @@ int main(int argc, gcc_unused char **argv) | ||||
| 	Error error; | ||||
| 	Mixer *mixer = mixer_new(event_loop, alsa_mixer_plugin, | ||||
| 				 *(AudioOutput *)nullptr, | ||||
| 				 *(MixerListener *)nullptr, | ||||
| 				 config_param(), error); | ||||
| 	if (mixer == NULL) { | ||||
| 		LogError(error, "mixer_new() failed"); | ||||
|   | ||||
| @@ -26,7 +26,6 @@ | ||||
| #include "Idle.hxx" | ||||
| #include "Main.hxx" | ||||
| #include "event/Loop.hxx" | ||||
| #include "GlobalEvents.hxx" | ||||
| #include "IOThread.hxx" | ||||
| #include "fs/Path.hxx" | ||||
| #include "AudioParser.hxx" | ||||
| @@ -47,11 +46,6 @@ | ||||
| #include <stdlib.h> | ||||
| #include <stdio.h> | ||||
|  | ||||
| void | ||||
| GlobalEvents::Emit(gcc_unused Event event) | ||||
| { | ||||
| } | ||||
|  | ||||
| const struct filter_plugin * | ||||
| filter_plugin_by_name(gcc_unused const char *name) | ||||
| { | ||||
| @@ -95,7 +89,9 @@ load_audio_output(EventLoop &event_loop, const char *name) | ||||
|  | ||||
| 	Error error; | ||||
| 	AudioOutput *ao = | ||||
| 		audio_output_new(event_loop, *param, dummy_player_control, | ||||
| 		audio_output_new(event_loop, *param, | ||||
| 				 *(MixerListener *)nullptr, | ||||
| 				 dummy_player_control, | ||||
| 				 error); | ||||
| 	if (ao == nullptr) | ||||
| 		LogError(error); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Max Kellermann
					Max Kellermann