From e15244b1e17dcf57f1543cced1819012ccda4ad2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 10 Sep 2024 17:28:37 +0200 Subject: [PATCH] params: add function to compare process_latency_info --- spa/include/spa/param/latency-utils.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spa/include/spa/param/latency-utils.h b/spa/include/spa/param/latency-utils.h index 83df433fa..fc7fb12d2 100644 --- a/spa/include/spa/param/latency-utils.h +++ b/spa/include/spa/param/latency-utils.h @@ -146,6 +146,17 @@ spa_process_latency_info_add(const struct spa_process_latency_info *process, return 0; } +static inline int +spa_process_latency_info_compare(const struct spa_process_latency_info *a, + const struct spa_process_latency_info *b) +{ + if (a->quantum == b->quantum && + a->rate == b->rate && + a->ns == b->ns) + return 0; + return 1; +} + /** * \} */