mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
add resample_method option module-combine
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@215 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
08953564bb
commit
61ec86c90f
14 changed files with 59 additions and 33 deletions
18
polyp/util.c
18
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue