diff options
author | Max Kellermann <max@duempel.org> | 2013-01-15 07:53:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-15 18:18:00 +0100 |
commit | 2101daef5a939d41a306fcccf2d94992f82723e2 (patch) | |
tree | c49c0b8cbd4fd08773a3b3e47768f63801a8b097 /test/read_mixer.cxx | |
parent | 083065f433cb513156878a33ebe5723ae27057da (diff) | |
download | mpd-2101daef5a939d41a306fcccf2d94992f82723e2.tar.gz mpd-2101daef5a939d41a306fcccf2d94992f82723e2.tar.xz mpd-2101daef5a939d41a306fcccf2d94992f82723e2.zip |
mixer/Alsa: use MultiSocketMonitor
Diffstat (limited to '')
-rw-r--r-- | test/read_mixer.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/read_mixer.cxx b/test/read_mixer.cxx index 0b6c16359..c7a5a3e03 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 <glib.h> @@ -34,6 +36,8 @@ extern "C" { #include <string.h> #include <unistd.h> +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) { |