From 2e9ce7cd455fe2c6b5df77dc23b4f09e6dc01a70 Mon Sep 17 00:00:00 2001 From: AceKombat Date: Tue, 24 Jan 2023 03:17:02 -0600 Subject: [PATCH] Update pcm_decoder.c --- src/coding/pcm_decoder.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coding/pcm_decoder.c b/src/coding/pcm_decoder.c index 472c8b72..e3f9c2e9 100644 --- a/src/coding/pcm_decoder.c +++ b/src/coding/pcm_decoder.c @@ -232,6 +232,10 @@ int32_t pcm_bytes_to_samples(size_t bytes, int channels, int bits_per_sample) { return ((int64_t)bytes * 8) / channels / bits_per_sample; } +int32_t pcm24_bytes_to_samples(size_t bytes, int channels) { + return pcm_bytes_to_samples(bytes, channels, 24); +} + int32_t pcm16_bytes_to_samples(size_t bytes, int channels) { return pcm_bytes_to_samples(bytes, channels, 16); }