diff options
Diffstat (limited to '')
-rw-r--r-- | test/read_mixer.cxx (renamed from test/read_mixer.c) | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/test/read_mixer.c b/test/read_mixer.cxx index f6de8177d..c7a5a3e03 100644 --- a/test/read_mixer.c +++ b/test/read_mixer.cxx @@ -18,11 +18,17 @@ */ #include "config.h" + +extern "C" { #include "mixer_control.h" #include "mixer_list.h" #include "filter_registry.h" +} + #include "pcm_volume.h" -#include "event_pipe.h" +#include "GlobalEvents.hxx" +#include "Main.hxx" +#include "event/Loop.hxx" #include <glib.h> @@ -30,6 +36,8 @@ #include <string.h> #include <unistd.h> +EventLoop *main_loop; + #ifdef HAVE_PULSE #include "output/pulse_output_plugin.h" @@ -84,7 +92,7 @@ roar_output_set_volume(G_GNUC_UNUSED struct roar *roar, #endif void -event_pipe_emit(G_GNUC_UNUSED enum pipe_event event) +GlobalEvents::Emit(gcc_unused Event event) { } @@ -118,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); @@ -137,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) { |