From 71262da6d7c41150684661b690465a0f09344e2c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 1 Aug 2023 18:20:04 +0200 Subject: [PATCH] audioconvert: remove requirement for data_loop We just need to get a timestamp so that we can do the rate limiting, we don't need anything accurate from the data_loop. --- spa/plugins/audioconvert/audioconvert.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spa/plugins/audioconvert/audioconvert.c b/spa/plugins/audioconvert/audioconvert.c index afdba1dcc..9a6b699d0 100644 --- a/spa/plugins/audioconvert/audioconvert.c +++ b/spa/plugins/audioconvert/audioconvert.c @@ -186,7 +186,6 @@ struct impl { struct spa_log *log; struct spa_cpu *cpu; - struct spa_system *data_system; uint32_t cpu_flags; uint32_t max_align; @@ -2620,7 +2619,7 @@ static inline bool resample_is_passthrough(struct impl *this) static uint64_t get_time_ns(struct impl *impl) { struct timespec now; - if (spa_system_clock_gettime(impl->data_system, CLOCK_MONOTONIC, &now) < 0) + if (clock_gettime(CLOCK_MONOTONIC, &now) < 0) return 0; return SPA_TIMESPEC_TO_NSEC(&now); } @@ -3215,11 +3214,6 @@ impl_init(const struct spa_handle_factory *factory, this->cpu_flags = spa_cpu_get_flags(this->cpu); this->max_align = SPA_MIN(MAX_ALIGN, spa_cpu_get_max_align(this->cpu)); } - this->data_system = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_DataSystem); - if (this->data_system == NULL) { - spa_log_error(this->log, "a data_system is needed"); - return -EINVAL; - } props_reset(&this->props); this->rate_limit.interval = 2 * SPA_NSEC_PER_SEC;