summaryrefslogtreecommitdiff
path: root/libasound.c
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2018-10-31 04:32:32 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2018-10-31 04:32:32 +0200
commitbfe1e062938c71c0a7ae4d86ca6a250cf374e6af (patch)
tree6d4d0c084c45146b50e096abf2365d6f766fd328 /libasound.c
parentaf2491b6e9090fd5d774123e6c2aee4b7de97f10 (diff)
implement snd_pcm_hw_params_test_format
Diffstat (limited to 'libasound.c')
-rw-r--r--libasound.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libasound.c b/libasound.c
index 15fb3e4..404cbd9 100644
--- a/libasound.c
+++ b/libasound.c
@@ -693,6 +693,14 @@ snd_pcm_format_mask_test(const snd_pcm_format_mask_t *mask, snd_pcm_format_t val
}
int
+snd_pcm_hw_params_test_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val)
+{
+ snd_pcm_format_mask_t mask;
+ snd_pcm_hw_params_get_format_mask(params, &mask);
+ return (snd_pcm_format_mask_test(&mask, val) ? 0 : -1);
+}
+
+int
snd_pcm_hw_params_set_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val)
{
// FIXME: prob should check hw caps