aboutsummaryrefslogtreecommitdiffstats
path: root/test/run_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_output.c')
-rw-r--r--test/run_output.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/run_output.c b/test/run_output.c
index 5e688f2c7..bbb1be7d2 100644
--- a/test/run_output.c
+++ b/test/run_output.c
@@ -124,7 +124,15 @@ run_output(struct audio_output *ao, struct audio_format *audio_format)
/* open the audio output */
GError *error = NULL;
+ if (!ao_plugin_enable(ao, &error)) {
+ g_printerr("Failed to enable audio output: %s\n",
+ error->message);
+ g_error_free(error);
+ return false;
+ }
+
if (!ao_plugin_open(ao, audio_format, &error)) {
+ ao_plugin_disable(ao);
g_printerr("Failed to open audio output: %s\n",
error->message);
g_error_free(error);
@@ -158,6 +166,7 @@ run_output(struct audio_output *ao, struct audio_format *audio_format)
&error);
if (consumed == 0) {
ao_plugin_close(ao);
+ ao_plugin_disable(ao);
g_printerr("Failed to play: %s\n",
error->message);
g_error_free(error);
@@ -173,6 +182,7 @@ run_output(struct audio_output *ao, struct audio_format *audio_format)
}
ao_plugin_close(ao);
+ ao_plugin_disable(ao);
return true;
}