mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
add --resample-method argument
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@214 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
95612b6b1c
commit
08953564bb
8 changed files with 67 additions and 45 deletions
|
|
@ -52,6 +52,7 @@ enum {
|
|||
ARG_LOAD,
|
||||
ARG_FILE,
|
||||
ARG_DL_SEARCH_PATH,
|
||||
ARG_RESAMPLE_METHOD
|
||||
};
|
||||
|
||||
static struct option long_options[] = {
|
||||
|
|
@ -71,6 +72,7 @@ static struct option long_options[] = {
|
|||
{"load", 1, 0, ARG_LOAD},
|
||||
{"file", 1, 0, ARG_FILE},
|
||||
{"dl-search-path", 1, 0, ARG_DL_SEARCH_PATH},
|
||||
{"resample-method", 1, 0, ARG_RESAMPLE_METHOD},
|
||||
{NULL, 0, 0, 0}
|
||||
};
|
||||
|
||||
|
|
@ -98,7 +100,8 @@ void pa_cmdline_help(const char *argv0) {
|
|||
" --module-idle-time=SECS Unload autoloaded modules when idle and this time passed\n"
|
||||
" --scache-idle-time=SECS Unload autoloaded samples when idle and this time passed\n"
|
||||
" --log-target={auto,syslog,stderr} Specify the log target\n"
|
||||
" -p, --dl-search-path=PATH Set the search path for dynamic shared objects (plugins)\n\n"
|
||||
" -p, --dl-search-path=PATH Set the search path for dynamic shared objects (plugins)\n"
|
||||
" --resample-method=[METHOD] Use the specified resampling method\n\n"
|
||||
|
||||
" -L, --load=\"MODULE ARGUMENTS\" Load the specified plugin module with the specified argument\n"
|
||||
" -F, --file=FILENAME Run the specified script\n"
|
||||
|
|
@ -198,15 +201,7 @@ int pa_cmdline_parse(struct pa_daemon_conf *conf, int argc, char *const argv [],
|
|||
break;
|
||||
|
||||
case ARG_LOG_TARGET:
|
||||
if (!strcmp(optarg, "syslog")) {
|
||||
conf->auto_log_target = 0;
|
||||
conf->log_target = PA_LOG_SYSLOG;
|
||||
} else if (!strcmp(optarg, "stderr")) {
|
||||
conf->auto_log_target = 0;
|
||||
conf->log_target = PA_LOG_STDERR;
|
||||
} else if (!strcmp(optarg, "auto"))
|
||||
conf->auto_log_target = 1;
|
||||
else {
|
||||
if (pa_daemon_conf_set_log_target(conf, optarg) < 0) {
|
||||
pa_log(__FILE__": Invalid log target: use either 'syslog', 'stderr' or 'auto'.\n");
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -223,6 +218,13 @@ int pa_cmdline_parse(struct pa_daemon_conf *conf, int argc, char *const argv [],
|
|||
case ARG_SCACHE_IDLE_TIME:
|
||||
conf->scache_idle_time = atoi(optarg);
|
||||
break;
|
||||
|
||||
case ARG_RESAMPLE_METHOD:
|
||||
if (pa_daemon_conf_set_resample_method(conf, optarg) < 0) {
|
||||
pa_log(__FILE__": Invalid resample method '%s'.\n", optarg);
|
||||
goto fail;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
goto fail;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue