summaryrefslogtreecommitdiffstats
path: root/polyp/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-17 21:10:05 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-17 21:10:05 +0000
commit61ec86c90f1964ab9663b7a72a0885078d372683 (patch)
treeb5409bf14cb0f01d3256f5901b00e58300d7617a /polyp/util.c
parent08953564bb85356869a1f043b82d1f365c8729a1 (diff)
add resample_method option module-combine
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@215 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/util.c')
-rw-r--r--polyp/util.c18
1 files changed, 18 insertions, 0 deletions
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 <sys/resource.h>
#include <limits.h>
+#include <samplerate.h>
+
#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;
+}