From 61ec86c90f1964ab9663b7a72a0885078d372683 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 17 Sep 2004 21:10:05 +0000 Subject: add resample_method option module-combine git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@215 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/util.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'polyp/util.c') diff --git a/polyp/util.c b/polyp/util.c index e4dcd1c9..b9bf9f82 100644 --- a/polyp/util.c +++ b/polyp/util.c @@ -41,6 +41,8 @@ #include #include +#include + #include "util.h" #include "xmalloc.h" #include "log.h" @@ -420,3 +422,19 @@ const char *pa_strsignal(int sig) { } } +int pa_parse_resample_method(const char *string) { + assert(string); + + if (!strcmp(string, "sinc-best-quality")) + return SRC_SINC_BEST_QUALITY; + else if (!strcmp(string, "sinc-medium-quality")) + return SRC_SINC_MEDIUM_QUALITY; + else if (!strcmp(string, "sinc-fastest")) + return SRC_SINC_FASTEST; + else if (!strcmp(string, "zero-order-hold")) + return SRC_ZERO_ORDER_HOLD; + else if (!strcmp(string, "linear")) + return SRC_LINEAR; + else + return -1; +} -- cgit