From 5d85e85ba7720b806ca2919b51fafd8c80c2fb51 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 2 Dec 2021 11:29:01 +0100 Subject: [PATCH] audioconvert: remove listener for resampler When adding a listener, don't add a listener for the resampler because it does not contribute to the result, we only listen for results from the resampler. --- spa/plugins/audioconvert/audioconvert.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c index fbb485657..185575b06 100644 --- a/spa/plugins/audioconvert/audioconvert.c +++ b/spa/plugins/audioconvert/audioconvert.c @@ -908,7 +908,7 @@ impl_node_add_listener(void *object, { struct impl *this = object; struct spa_hook_list save; - struct spa_hook l[4]; + struct spa_hook l[3]; spa_return_val_if_fail(this != NULL, -EINVAL); @@ -924,18 +924,15 @@ impl_node_add_listener(void *object, &l[0], &fmt_input_events, this); spa_node_add_listener(this->channelmix, &l[1], &channelmix_events, this); - spa_node_add_listener(this->resample, - &l[2], &resample_events, this); if (this->fmt[SPA_DIRECTION_OUTPUT]) spa_node_add_listener(this->fmt[SPA_DIRECTION_OUTPUT], - &l[3], &fmt_output_events, this); + &l[2], &fmt_output_events, this); if (this->fmt[SPA_DIRECTION_INPUT]) spa_hook_remove(&l[0]); spa_hook_remove(&l[1]); - spa_hook_remove(&l[2]); if (this->fmt[SPA_DIRECTION_OUTPUT]) - spa_hook_remove(&l[3]); + spa_hook_remove(&l[2]); this->add_listener = false;