From 2101daef5a939d41a306fcccf2d94992f82723e2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Jan 2013 07:53:44 +0100 Subject: mixer/Alsa: use MultiSocketMonitor --- test/read_mixer.cxx | 8 ++++++++ test/run_output.cxx | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'test') diff --git a/test/read_mixer.cxx b/test/read_mixer.cxx index 0b6c1635..c7a5a3e0 100644 --- a/test/read_mixer.cxx +++ b/test/read_mixer.cxx @@ -27,6 +27,8 @@ extern "C" { #include "pcm_volume.h" #include "GlobalEvents.hxx" +#include "Main.hxx" +#include "event/Loop.hxx" #include @@ -34,6 +36,8 @@ extern "C" { #include #include +EventLoop *main_loop; + #ifdef HAVE_PULSE #include "output/pulse_output_plugin.h" @@ -122,6 +126,8 @@ int main(int argc, G_GNUC_UNUSED char **argv) g_thread_init(NULL); + main_loop = new EventLoop(EventLoop::Default()); + mixer = mixer_new(&alsa_mixer_plugin, NULL, NULL, &error); if (mixer == NULL) { g_printerr("mixer_new() failed: %s\n", error->message); @@ -141,6 +147,8 @@ int main(int argc, G_GNUC_UNUSED char **argv) mixer_close(mixer); mixer_free(mixer); + delete main_loop; + assert(volume >= -1 && volume <= 100); if (volume < 0) { diff --git a/test/run_output.cxx b/test/run_output.cxx index 29fb6462..50542347 100644 --- a/test/run_output.cxx +++ b/test/run_output.cxx @@ -21,6 +21,8 @@ #include "OutputControl.hxx" #include "conf.h" #include "Idle.hxx" +#include "Main.hxx" +#include "event/Loop.hxx" #include "GlobalEvents.hxx" #include "IOThread.hxx" @@ -42,6 +44,8 @@ extern "C" { #include #include +EventLoop *main_loop; + void GlobalEvents::Emit(gcc_unused Event event) { @@ -211,6 +215,8 @@ int main(int argc, char **argv) return 1; } + main_loop = new EventLoop(EventLoop::Default()); + io_thread_init(); if (!io_thread_start(&error)) { g_warning("%s", error->message); @@ -247,6 +253,8 @@ int main(int argc, char **argv) io_thread_deinit(); + delete main_loop; + config_global_finish(); return success ? EXIT_SUCCESS : EXIT_FAILURE; -- cgit v1.2.3