aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output_init.c')
-rw-r--r--src/output_init.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/output_init.c b/src/output_init.c
index d72893ba8..3b2c9d54f 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -23,9 +23,14 @@
#include "output_list.h"
#include "audio_parser.h"
#include "mixer_control.h"
+#include "filter_plugin.h"
+#include "filter_registry.h"
+#include "filter/chain_filter_plugin.h"
#include <glib.h>
+#include <assert.h>
+
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "output"
@@ -124,7 +129,15 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
ao->open = false;
ao->fail_timer = NULL;
- pcm_convert_init(&ao->convert_state);
+ /* set up the filter chain */
+
+ ao->filter = filter_chain_new();
+ assert(ao->filter != NULL);
+
+ ao->convert_filter = filter_new(&convert_filter_plugin, NULL, NULL);
+ assert(ao->convert_filter != NULL);
+
+ filter_chain_append(ao->filter, ao->convert_filter);
ao->config_audio_format = format != NULL;
if (ao->config_audio_format) {