From 6b99b547ca99113ac3a3d9d5332b8a7fba2d7562 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" <114750+alfredh@users.noreply.github.com> Date: Thu, 26 Dec 2024 14:22:11 +0100 Subject: [PATCH] rem: add au_ prefix to calc_nsamp() --- include/rem_au.h | 9 ++++++++- rem/au/util.c | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/rem_au.h b/include/rem_au.h index 8174acb93..aa6af8dfb 100644 --- a/include/rem_au.h +++ b/include/rem_au.h @@ -19,4 +19,11 @@ enum aufmt { size_t aufmt_sample_size(enum aufmt fmt); const char *aufmt_name(enum aufmt fmt); -uint32_t calc_nsamp(uint32_t srate, uint8_t channels, uint16_t ptime); +uint32_t au_calc_nsamp(uint32_t srate, uint8_t channels, uint16_t ptime); + +/* todo: remove backwards wrapper later */ +static inline uint32_t calc_nsamp(uint32_t srate, uint8_t channels, + uint16_t ptime) +{ + return au_calc_nsamp(srate, channels, ptime); +} diff --git a/rem/au/util.c b/rem/au/util.c index dddf19ce4..e98f72bfa 100644 --- a/rem/au/util.c +++ b/rem/au/util.c @@ -17,7 +17,7 @@ * * @return Number of samples */ -uint32_t calc_nsamp(uint32_t srate, uint8_t channels, uint16_t ptime) +uint32_t au_calc_nsamp(uint32_t srate, uint8_t channels, uint16_t ptime) { return srate * channels * ptime / 1000; }