diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-17 21:10:05 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-17 21:10:05 +0000 |
commit | 61ec86c90f1964ab9663b7a72a0885078d372683 (patch) | |
tree | b5409bf14cb0f01d3256f5901b00e58300d7617a /polyp/daemon-conf.c | |
parent | 08953564bb85356869a1f043b82d1f365c8729a1 (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/daemon-conf.c')
-rw-r--r-- | polyp/daemon-conf.c | 15 |
1 files changed, 3 insertions, 12 deletions
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; } |