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/daemon-conf.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'polyp/daemon-conf.c') diff --git a/polyp/daemon-conf.c b/polyp/daemon-conf.c index 6dcd540d..befb9602 100644 --- a/polyp/daemon-conf.c +++ b/polyp/daemon-conf.c @@ -125,25 +125,16 @@ int pa_daemon_conf_set_log_target(struct pa_daemon_conf *c, const char *string) return -1; return 0; - } int pa_daemon_conf_set_resample_method(struct pa_daemon_conf *c, const char *string) { + int m; assert(c && string); - if (!strcmp(string, "sinc-best-quality")) - c->resample_method = SRC_SINC_BEST_QUALITY; - else if (!strcmp(string, "sinc-medium-quality")) - c->resample_method = SRC_SINC_MEDIUM_QUALITY; - else if (!strcmp(string, "sinc-fastest")) - c->resample_method = SRC_SINC_FASTEST; - else if (!strcmp(string, "zero-order-hold")) - c->resample_method = SRC_ZERO_ORDER_HOLD; - else if (!strcmp(string, "linear")) - c->resample_method = SRC_LINEAR; - else + if ((m = pa_parse_resample_method(string)) < 0) return -1; + c->resample_method = m; return 0; } -- cgit