diff options
author | Tanu Kaskinen <tanuk@iki.fi> | 2009-06-29 18:35:06 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2009-06-29 18:35:06 +0300 |
commit | 0bc538b08ca5c4efea86700cb6c4685da3f34345 (patch) | |
tree | e5b0fe4b967ecb7e9251faf21904bbbe825aaab7 /src/daemon/daemon-conf.c | |
parent | b152f3a052eca7225870a7dc4d8a719bee107f0f (diff) | |
parent | 2654eb7781ddcfe53064745bbad77bffe5c8eada (diff) |
Merge branch 'master' into dbus-work
Conflicts:
src/daemon/daemon-conf.c
src/daemon/daemon-conf.h
src/daemon/main.c
src/pulsecore/dbus-util.h
Diffstat (limited to 'src/daemon/daemon-conf.c')
-rw-r--r-- | src/daemon/daemon-conf.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index e6fa8c64..ace460ed 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c @@ -60,7 +60,7 @@ static const pa_daemon_conf default_conf = { .fail = TRUE, .high_priority = TRUE, .nice_level = -11, - .realtime_scheduling = FALSE, + .realtime_scheduling = TRUE, .realtime_priority = 5, /* Half of JACK's default rtprio */ .disallow_module_loading = FALSE, .disallow_exit = FALSE, @@ -88,6 +88,7 @@ static const pa_daemon_conf default_conf = { #endif .no_cpu_limit = FALSE, .disable_shm = FALSE, + .lock_memory = FALSE, .default_n_fragments = 4, .default_fragment_size_msec = 25, .default_sample_spec = { .format = PA_SAMPLE_S16NE, .rate = 44100, .channels = 2 }, @@ -484,6 +485,7 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) { { "no-cpu-limit", pa_config_parse_bool, &c->no_cpu_limit, NULL }, { "disable-shm", pa_config_parse_bool, &c->disable_shm, NULL }, { "flat-volumes", pa_config_parse_bool, &c->flat_volumes, NULL }, + { "lock-memory", pa_config_parse_bool, &c->lock_memory, NULL }, { "exit-idle-time", pa_config_parse_int, &c->exit_idle_time, NULL }, { "scache-idle-time", pa_config_parse_int, &c->scache_idle_time, NULL }, { "realtime-priority", parse_rtprio, c, NULL }, @@ -633,23 +635,22 @@ FILE *pa_daemon_conf_open_default_script_file(pa_daemon_conf *c) { return f; } +char *pa_daemon_conf_dump(pa_daemon_conf *c) { + static const char* const log_level_to_string[] = { + [PA_LOG_DEBUG] = "debug", + [PA_LOG_INFO] = "info", + [PA_LOG_NOTICE] = "notice", + [PA_LOG_WARN] = "warning", + [PA_LOG_ERROR] = "error" + }; -static const char* const log_level_to_string[] = { - [PA_LOG_DEBUG] = "debug", - [PA_LOG_INFO] = "info", - [PA_LOG_NOTICE] = "notice", - [PA_LOG_WARN] = "warning", - [PA_LOG_ERROR] = "error" -}; - -static const char* const server_type_to_string[] = { - [PA_SERVER_TYPE_UNSET] = "!!UNSET!!", - [PA_SERVER_TYPE_USER] = "user", - [PA_SERVER_TYPE_SYSTEM] = "system", - [PA_SERVER_TYPE_NONE] = "none" -}; + static const char* const server_type_to_string[] = { + [PA_SERVER_TYPE_UNSET] = "!!UNSET!!", + [PA_SERVER_TYPE_USER] = "user", + [PA_SERVER_TYPE_SYSTEM] = "system", + [PA_SERVER_TYPE_NONE] = "none" + }; -char *pa_daemon_conf_dump(pa_daemon_conf *c) { pa_strbuf *s; char cm[PA_CHANNEL_MAP_SNPRINT_MAX]; @@ -678,6 +679,7 @@ char *pa_daemon_conf_dump(pa_daemon_conf *c) { pa_strbuf_printf(s, "no-cpu-limit = %s\n", pa_yes_no(c->no_cpu_limit)); pa_strbuf_printf(s, "disable-shm = %s\n", pa_yes_no(c->disable_shm)); pa_strbuf_printf(s, "flat-volumes = %s\n", pa_yes_no(c->flat_volumes)); + pa_strbuf_printf(s, "lock-memory = %s\n", pa_yes_no(c->lock_memory)); pa_strbuf_printf(s, "exit-idle-time = %i\n", c->exit_idle_time); pa_strbuf_printf(s, "scache-idle-time = %i\n", c->scache_idle_time); pa_strbuf_printf(s, "dl-search-path = %s\n", pa_strempty(c->dl_search_path)); |