aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_output.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-08-28 17:29:09 +0200
committerMax Kellermann <max@duempel.org>2011-08-29 11:23:51 +0200
commit9ccaa904393ddf2189f7d7815cef29a3e3393cbc (patch)
treeec6e7a2bba829b6cbc8607ef304eecb279408465 /test/run_output.c
parent4733c5fef00abacfbca414d96114bd7a5427ca12 (diff)
downloadmpd-9ccaa904393ddf2189f7d7815cef29a3e3393cbc.tar.gz
mpd-9ccaa904393ddf2189f7d7815cef29a3e3393cbc.tar.xz
mpd-9ccaa904393ddf2189f7d7815cef29a3e3393cbc.zip
ntp_server: use the I/O thread
Diffstat (limited to 'test/run_output.c')
-rw-r--r--test/run_output.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/run_output.c b/test/run_output.c
index 8a34fedec..b4d2b8f9c 100644
--- a/test/run_output.c
+++ b/test/run_output.c
@@ -18,6 +18,7 @@
*/
#include "config.h"
+#include "io_thread.h"
#include "output_plugin.h"
#include "output_internal.h"
#include "output_control.h"
@@ -36,6 +37,7 @@
#include <assert.h>
#include <string.h>
#include <unistd.h>
+#include <stdlib.h>
struct playlist g_playlist;
@@ -146,6 +148,13 @@ int main(int argc, char **argv)
return 1;
}
+ io_thread_init();
+ if (!io_thread_start(&error)) {
+ g_warning("%s", error->message);
+ g_error_free(error);
+ return EXIT_FAILURE;
+ }
+
/* initialize the audio output */
if (!load_audio_output(&ao, argv[2]))
@@ -216,6 +225,8 @@ int main(int argc, char **argv)
ao_plugin_finish(ao.plugin, ao.data);
g_mutex_free(ao.mutex);
+ io_thread_deinit();
+
config_global_finish();
return 0;