#include <pulse/xmalloc.h>
#include <pulse/timeval.h>
+#include <pulse/i18n.h>
#include <pulsecore/core-error.h>
#include <pulsecore/core-util.h>
.realtime_scheduling = FALSE,
.realtime_priority = 5, /* Half of JACK's default rtprio */
.disallow_module_loading = FALSE,
- .exit_idle_time = -1,
+ .exit_idle_time = 20,
.module_idle_time = 20,
.scache_idle_time = 20,
.auto_log_target = 1,
pa_assert(data);
if (pa_daemon_conf_set_log_target(c, rvalue) < 0) {
- pa_log("[%s:%u] Invalid log target '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid log target '%s'."), filename, line, rvalue);
return -1;
}
pa_assert(data);
if (pa_daemon_conf_set_log_level(c, rvalue) < 0) {
- pa_log("[%s:%u] Invalid log level '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid log level '%s'."), filename, line, rvalue);
return -1;
}
pa_assert(data);
if (pa_daemon_conf_set_resample_method(c, rvalue) < 0) {
- pa_log("[%s:%u] Invalid resample method '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid resample method '%s'."), filename, line, rvalue);
return -1;
}
} else {
int32_t k;
if (pa_atoi(rvalue, &k) < 0) {
- pa_log("[%s:%u] Invalid rlimit '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid rlimit '%s'."), filename, line, rvalue);
return -1;
}
r->is_set = k >= 0;
r->value = k >= 0 ? (rlim_t) k : 0;
}
#else
- pa_log_warn("[%s:%u] rlimit not supported on this platform.", filename, line);
+ pa_log_warn(_("[%s:%u] rlimit not supported on this platform."), filename, line);
#endif
return 0;
pa_assert(data);
if ((f = pa_parse_sample_format(rvalue)) < 0) {
- pa_log("[%s:%u] Invalid sample format '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid sample format '%s'."), filename, line, rvalue);
return -1;
}
pa_assert(data);
if (pa_atoi(rvalue, &r) < 0 || r > (int32_t) PA_RATE_MAX || r <= 0) {
- pa_log("[%s:%u] Invalid sample rate '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid sample rate '%s'."), filename, line, rvalue);
return -1;
}
pa_assert(data);
if (pa_atoi(rvalue, &n) < 0 || n > (int32_t) PA_CHANNELS_MAX || n <= 0) {
- pa_log("[%s:%u] Invalid sample channels '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid sample channels '%s'."), filename, line, rvalue);
return -1;
}
pa_assert(data);
if (pa_atoi(rvalue, &n) < 0 || n < 2) {
- pa_log("[%s:%u] Invalid number of fragments '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid number of fragments '%s'."), filename, line, rvalue);
return -1;
}
pa_assert(data);
if (pa_atoi(rvalue, &n) < 0 || n < 1) {
- pa_log("[%s:%u] Invalid fragment size '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid fragment size '%s'."), filename, line, rvalue);
return -1;
}
pa_assert(data);
if (pa_atoi(rvalue, &level) < 0 || level < -20 || level > 19) {
- pa_log("[%s:%u] Invalid nice level '%s'.", filename, line, rvalue);
+ pa_log(_("[%s:%u] Invalid nice level '%s'."), filename, line, rvalue);
return -1;
}
pa_open_config_file(DEFAULT_CONFIG_FILE, DEFAULT_CONFIG_FILE_USER, ENV_CONFIG_FILE, &c->config_file);
if (!f && errno != ENOENT) {
- pa_log_warn("Failed to open configuration file: %s", pa_cstrerror(errno));
+ pa_log_warn(_("Failed to open configuration file: %s"), pa_cstrerror(errno));
goto finish;
}
s = pa_strbuf_new();
if (c->config_file)
- pa_strbuf_printf(s, "### Read from configuration file: %s ###\n", c->config_file);
+ pa_strbuf_printf(s, _("### Read from configuration file: %s ###\n"), c->config_file);
pa_assert(c->log_level <= PA_LOG_LEVEL_MAX);