From 10fde4dd0a20114323e8370195ed18483617a235 Mon Sep 17 00:00:00 2001 From: Ogromny Date: Mon, 9 Jan 2023 10:07:41 +0100 Subject: [PATCH] modules/pipewire: use roundf instead of ceilf for more accuracy --- modules/pipewire.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/pipewire.c b/modules/pipewire.c index 0cc641d..ee8359a 100644 --- a/modules/pipewire.c +++ b/modules/pipewire.c @@ -478,8 +478,8 @@ node_events_param(void *userdata, __attribute__((unused)) int seq, __attribute__ total += values[i]; float base_volume = total / n_values; - output_informations->linear_volume = ceilf(base_volume * 100); - output_informations->cubic_volume = ceilf(cbrtf(base_volume) * 100); + output_informations->linear_volume = roundf(base_volume * 100); + output_informations->cubic_volume = roundf(cbrtf(base_volume) * 100); } }