diff options
author | Jyri Sarha <jyri.sarha@nokia.com> | 2010-10-15 13:05:17 +0300 |
---|---|---|
committer | Colin Guthrie <cguthrie@mandriva.org> | 2010-10-16 11:53:39 +0100 |
commit | 3e53e3bba31fcf62fc7b50c5be5d1fe3f36955e0 (patch) | |
tree | c73725739840be6bd4c9743ecc0b75f5b43931a7 /src/pulsecore | |
parent | 43b3f39a2f0f41d6041e3d082f7aaa3f0a565e92 (diff) |
daemon-conf: Add sync volume parameters to daemon-conf
Signed-off-by: Jyri Sarha <jyri.sarha@nokia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
Reviewd-by: Colin Guthrie <cguthrie@mandriva.org>
Diffstat (limited to 'src/pulsecore')
-rw-r--r-- | src/pulsecore/core.c | 4 | ||||
-rw-r--r-- | src/pulsecore/core.h | 3 | ||||
-rw-r--r-- | src/pulsecore/sink.c | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/pulsecore/core.c b/src/pulsecore/core.c index f0726453..626ae65f 100644 --- a/src/pulsecore/core.c +++ b/src/pulsecore/core.c @@ -117,6 +117,9 @@ pa_core* pa_core_new(pa_mainloop_api *m, pa_bool_t shared, size_t shm_size) { c->default_n_fragments = 4; c->default_fragment_size_msec = 25; + c->sync_volume_safety_margin_usec = 8000; + c->sync_volume_extra_delay_usec = 0; + c->module_defer_unload_event = NULL; c->scache_auto_unload_event = NULL; @@ -141,6 +144,7 @@ pa_core* pa_core_new(pa_mainloop_api *m, pa_bool_t shared, size_t shm_size) { c->realtime_priority = 5; c->disable_remixing = FALSE; c->disable_lfe_remixing = FALSE; + c->sync_volume = TRUE; c->resample_method = PA_RESAMPLER_SPEEX_FLOAT_BASE + 3; for (j = 0; j < PA_CORE_HOOK_MAX; j++) diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h index 6088f915..a1215bb5 100644 --- a/src/pulsecore/core.h +++ b/src/pulsecore/core.h @@ -142,6 +142,8 @@ struct pa_core { pa_channel_map default_channel_map; pa_sample_spec default_sample_spec; unsigned default_n_fragments, default_fragment_size_msec; + unsigned sync_volume_safety_margin_usec; + int sync_volume_extra_delay_usec; pa_defer_event *module_defer_unload_event; @@ -165,6 +167,7 @@ struct pa_core { pa_bool_t realtime_scheduling:1; pa_bool_t disable_remixing:1; pa_bool_t disable_lfe_remixing:1; + pa_bool_t sync_volume:1; pa_resample_method_t resample_method; int realtime_priority; diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index a42a1472..136508b2 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -53,8 +53,6 @@ #define ABSOLUTE_MIN_LATENCY (500) #define ABSOLUTE_MAX_LATENCY (10*PA_USEC_PER_SEC) #define DEFAULT_FIXED_LATENCY (250*PA_USEC_PER_MSEC) -#define VOLUME_CHANGE_SAFETY_MARGIN_DEFAULT (8*PA_USEC_PER_MSEC) -#define VOLUME_CHANGE_EXTRA_DELAY_DEFAULT (0*PA_USEC_PER_MSEC) PA_DEFINE_PUBLIC_CLASS(pa_sink, pa_msgobject); @@ -333,8 +331,8 @@ pa_sink* pa_sink_new( PA_LLIST_HEAD_INIT(pa_sink_volume_change, s->thread_info.volume_changes); s->thread_info.volume_changes_tail = NULL; pa_sw_cvolume_multiply(&s->thread_info.current_hw_volume, &s->soft_volume, &s->real_volume); - s->thread_info.volume_change_safety_margin = VOLUME_CHANGE_SAFETY_MARGIN_DEFAULT; - s->thread_info.volume_change_extra_delay = VOLUME_CHANGE_EXTRA_DELAY_DEFAULT; + s->thread_info.volume_change_safety_margin = core->sync_volume_safety_margin_usec; + s->thread_info.volume_change_extra_delay = core->sync_volume_extra_delay_usec; /* FIXME: This should probably be moved to pa_sink_put() */ pa_assert_se(pa_idxset_put(core->sinks, s, &s->index) >= 0); |