aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_output.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-05 00:02:02 +0100
committerMax Kellermann <max@duempel.org>2014-02-05 00:02:02 +0100
commite8938b1069739eca2bd2f27705c1c7783e834e59 (patch)
tree482330dbf228c12a60c9a401f0428cc4e292e234 /test/run_output.cxx
parent4a283330394fd2e1541a03bd312e5fadf54aa055 (diff)
downloadmpd-e8938b1069739eca2bd2f27705c1c7783e834e59.tar.gz
mpd-e8938b1069739eca2bd2f27705c1c7783e834e59.tar.xz
mpd-e8938b1069739eca2bd2f27705c1c7783e834e59.zip
MixerPlugin: add EventLoop& init() parameter
Diffstat (limited to '')
-rw-r--r--test/run_output.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/test/run_output.cxx b/test/run_output.cxx
index 23fd1ad3a..6a6400477 100644
--- a/test/run_output.cxx
+++ b/test/run_output.cxx
@@ -45,8 +45,6 @@
#include <stdlib.h>
#include <stdio.h>
-EventLoop *main_loop;
-
void
GlobalEvents::Emit(gcc_unused Event event)
{
@@ -80,7 +78,7 @@ PlayerControl::PlayerControl(gcc_unused MultipleOutputs &_outputs,
PlayerControl::~PlayerControl() {}
static AudioOutput *
-load_audio_output(const char *name)
+load_audio_output(EventLoop &event_loop, const char *name)
{
const struct config_param *param;
@@ -95,7 +93,8 @@ load_audio_output(const char *name)
Error error;
AudioOutput *ao =
- audio_output_new(*param, dummy_player_control, error);
+ audio_output_new(event_loop, *param, dummy_player_control,
+ error);
if (ao == nullptr)
LogError(error);
@@ -189,14 +188,14 @@ int main(int argc, char **argv)
return EXIT_FAILURE;
}
- main_loop = new EventLoop();
+ EventLoop event_loop;
io_thread_init();
io_thread_start();
/* initialize the audio output */
- AudioOutput *ao = load_audio_output(argv[2]);
+ AudioOutput *ao = load_audio_output(event_loop, argv[2]);
if (ao == NULL)
return 1;
@@ -219,8 +218,6 @@ int main(int argc, char **argv)
io_thread_deinit();
- delete main_loop;
-
config_global_finish();
return success ? EXIT_SUCCESS : EXIT_FAILURE;