From 00c2f6fe4f8ab3a11a8fca7d52da64c59615c2e2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 11 Jul 2019 11:28:26 +0200 Subject: [PATCH] adapter: produce output when we have a monitor --- spa/plugins/audioconvert/audioadapter.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spa/plugins/audioconvert/audioadapter.c b/spa/plugins/audioconvert/audioadapter.c index 4a9a86ddb..7528b0f65 100644 --- a/spa/plugins/audioconvert/audioadapter.c +++ b/spa/plugins/audioconvert/audioadapter.c @@ -75,6 +75,7 @@ struct impl { unsigned int active:1; unsigned int driver:1; unsigned int master:1; + unsigned int monitor:1; }; /** \endcond */ @@ -780,6 +781,9 @@ static int impl_node_process(void *object) status = spa_node_process(this->slave); + if (this->monitor) + status |= SPA_STATUS_HAVE_BUFFER; + if (this->direction == SPA_DIRECTION_OUTPUT && !this->master) { if (this->use_converter) status = spa_node_process(this->convert); @@ -887,6 +891,9 @@ impl_init(const struct spa_handle_factory *factory, if (this->slave == NULL) return -EINVAL; + if ((str = spa_dict_lookup(info, "merger.monitor")) != NULL) + this->monitor = atoi(str); + spa_node_add_listener(this->slave, &this->slave_listener, &slave_node_events, this); spa_node_set_callbacks(this->slave, &slave_node_callbacks, this);