From 54c391e6db550c5519df0ebb37f2197eed440c92 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 1 Mar 2011 16:34:06 +0530 Subject: format: Add convenience API to check if a format is PCM or not --- src/pulse/format.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pulse/format.c') diff --git a/src/pulse/format.c b/src/pulse/format.c index c3962de9..4ecd75ee 100644 --- a/src/pulse/format.c +++ b/src/pulse/format.c @@ -70,6 +70,10 @@ int pa_format_info_valid(pa_format_info *f) { return (f->encoding >= 0 && f->encoding < PA_ENCODING_MAX && f->plist != NULL); } +int pa_format_info_is_pcm(pa_format_info *f) { + return f->encoding == PA_ENCODING_PCM; +} + pa_bool_t pa_format_info_is_compatible(pa_format_info *first, pa_format_info *second) { const char *key; void *state = NULL; -- cgit