aboutsummaryrefslogtreecommitdiff
path: root/pcm.c
diff options
context:
space:
mode:
authorSimon Wilson <simonwilson@google.com>2013-07-17 10:30:35 -0700
committerSimon Wilson <simonwilson@google.com>2013-07-17 11:08:46 -0700
commit7136cf7c86ded4b498c08bfc295391184debbaf7 (patch)
tree70a753f49eb8c83e15f51574b904f38142b30a7e /pcm.c
parentec281392bb826caa21cbba9aa2ebed1a9629d921 (diff)
pcm: support S24_LE format
S24_LE is 24 bit audio in a 32 bit sample size. Also make the pcm_format_to_bits() function part of the API since it will be required for tinycap.
Diffstat (limited to 'pcm.c')
-rw-r--r--pcm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pcm.c b/pcm.c
index fd0242a..ca3eb3e 100644
--- a/pcm.c
+++ b/pcm.c
@@ -212,10 +212,11 @@ static unsigned int pcm_format_to_alsa(enum pcm_format format)
};
}
-static unsigned int pcm_format_to_bits(enum pcm_format format)
+unsigned int pcm_format_to_bits(enum pcm_format format)
{
switch (format) {
case PCM_FORMAT_S32_LE:
+ case PCM_FORMAT_S24_LE:
return 32;
default:
case PCM_FORMAT_S16_LE: