diff --git a/src/modules/module-suspend-on-idle.c b/src/modules/module-suspend-on-idle.c index 7b738f874c1abe603efadca956d3ecf0f1e57a74..340b795294028d0ef317675682f2cfe3b30c73cf 100644 --- a/src/modules/module-suspend-on-idle.c +++ b/src/modules/module-suspend-on-idle.c @@ -332,7 +332,6 @@ static pa_hook_result_t device_new_hook_cb(pa_core *c, pa_object *o, struct user pa_assert(source || sink); timeout_str = pa_proplist_gets(sink ? sink->proplist : source->proplist, "module-suspend-on-idle.timeout"); - if (timeout_str && pa_atoi(timeout_str, &timeout) >= 0) timeout_valid = true; else diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c index 8e794d458c5d02bd4721f3bbd61d83286193d300..ac150f4ae598e68470b3e9d088ce58098d278bb7 100644 --- a/src/pulse/thread-mainloop.c +++ b/src/pulse/thread-mainloop.c @@ -168,7 +168,7 @@ void pa_threaded_mainloop_lock(pa_threaded_mainloop *m) { pa_assert(m); /* Make sure that this function is not called from the helper thread, unless it is unlocked */ - //pa_assert(!m->thread || !pa_thread_is_running(m->thread) || !in_worker(m) || pa_atomic_load(&m->in_once_unlocked)); + pa_assert(!m->thread || !pa_thread_is_running(m->thread) || !in_worker(m) || pa_atomic_load(&m->in_once_unlocked)); pa_mutex_lock(m->mutex); } @@ -177,7 +177,7 @@ void pa_threaded_mainloop_unlock(pa_threaded_mainloop *m) { pa_assert(m); /* Make sure that this function is not called from the helper thread, unless it is unlocked */ - //pa_assert(!m->thread || !pa_thread_is_running(m->thread) || !in_worker(m) || pa_atomic_load(&m->in_once_unlocked)); + pa_assert(!m->thread || !pa_thread_is_running(m->thread) || !in_worker(m) || pa_atomic_load(&m->in_once_unlocked)); pa_mutex_unlock(m->mutex); } @@ -216,9 +216,9 @@ void pa_threaded_mainloop_accept(pa_threaded_mainloop *m) { pa_assert(m); /* Make sure that this function is not called from the helper thread */ - //pa_assert(!m->thread || !pa_thread_is_running(m->thread) || !in_worker(m)); + pa_assert(!m->thread || !pa_thread_is_running(m->thread) || !in_worker(m)); - //pa_assert(m->n_waiting_for_accept > 0); + pa_assert(m->n_waiting_for_accept > 0); m->n_waiting_for_accept --; pa_cond_signal(m->accept_cond, 0); diff --git a/src/pulsecore/asyncmsgq.c b/src/pulsecore/asyncmsgq.c index c176bd0eb085fa3e70f7bde692906bafdf1b9f9e..5e5f1121381b83c7c530a00da0a3e282a8ca5777 100644 --- a/src/pulsecore/asyncmsgq.c +++ b/src/pulsecore/asyncmsgq.c @@ -76,7 +76,7 @@ pa_asyncmsgq *pa_asyncmsgq_new(unsigned size) { pa_assert_se(a->mutex = pa_mutex_new(false, true)); a->current = NULL; asyncmsgqNum += 1; - a->mark = asyncmsgqNum; + a->mark = asyncmsgqNum; return a; } diff --git a/src/pulsecore/modargs.c b/src/pulsecore/modargs.c index 73ae66311ece02f19035081c80c13d639ec59dc2..cda2bbc847502ca7bec63e881f458d1871f92d4c 100644 --- a/src/pulsecore/modargs.c +++ b/src/pulsecore/modargs.c @@ -344,6 +344,7 @@ int pa_modargs_get_value_s32(pa_modargs *ma, const char *key, int32_t *value) { int pa_modargs_get_value_u64(pa_modargs *ma, const char *key, uint64_t *value) { const char *v; + pa_assert(value); if (!(v = pa_modargs_get_value(ma, key, NULL))) { diff --git a/src/pulsecore/remap.c b/src/pulsecore/remap.c index 35fffd7d248ad909428c10fb9b6f9ccdd03ac356..05f9adb060a853757634ba15add1c4113809a844 100644 --- a/src/pulsecore/remap.c +++ b/src/pulsecore/remap.c @@ -282,7 +282,7 @@ static void remap_channels_matrix_s16ne_c(pa_remap_t *m, int16_t *dst, const int *d += *s; } else { for (i = n; i > 0; i--, s += n_ic, d += n_oc) - *d += (int16_t) (((int32_t)*s * vol) >> 16); + *d += (int16_t) ((((int32_t)*s * vol) >> 16) * 0.99); } } } diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index da0798a3f1f7b825164530412aca861186d1a7a6..c562f22228ecf0a5d34f318cac5adaaeb4c0b126 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -1562,7 +1562,7 @@ bool pa_sink_input_is_passthrough(pa_sink_input *i) { /* Called from main context */ bool pa_sink_input_is_volume_readable(pa_sink_input *i) { pa_sink_input_assert_ref(i); - // pa_assert_ctl_context(); + pa_assert_ctl_context(); return !pa_sink_input_is_passthrough(i); } @@ -1570,7 +1570,6 @@ bool pa_sink_input_is_volume_readable(pa_sink_input *i) { /* Called from main context */ pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute) { pa_sink_input_assert_ref(i); - // pa_assert_ctl_context(); pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); pa_assert(pa_sink_input_is_volume_readable(i)); @@ -2561,7 +2560,7 @@ void pa_sink_input_send_event(pa_sink_input *i, const char *event, pa_proplist * pa_sink_input_send_event_hook_data hook_data; pa_sink_input_assert_ref(i); - // pa_assert_ctl_context(); + pa_assert_ctl_context(); pa_assert(event); if (!i->send_event) diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index 90ad1a75e0b22264dcd37ad9cf348b4cfc4faf14..b355e3dccd4b306cabd1c7b577baf95a4bcb55e9 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -3367,7 +3367,7 @@ void pa_sink_set_fixed_latency(pa_sink *s, pa_usec_t latency) { pa_assert_ctl_context(); if (s->flags & PA_SINK_DYNAMIC_LATENCY) { - //pa_assert(latency == 0); + pa_assert(latency == 0); return; } diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c index 7055137cff7b7054628d5d3df5182353cdd295f6..dc86ac5ea034fd3682599da63b3fdc8742bc998b 100644 --- a/src/pulsecore/source-output.c +++ b/src/pulsecore/source-output.c @@ -1299,6 +1299,7 @@ bool pa_source_output_may_move(pa_source_output *o) { pa_log_info("Refused move to new default source!"); return false; } + if (o->direct_on_input) return false;