Update pcm_decoder.c

This commit is contained in:
AceKombat 2023-01-24 03:17:02 -06:00 committed by GitHub
parent b250b3faa5
commit 2e9ce7cd45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}