summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pulsecore/sink-input.c13
-rw-r--r--src/pulsecore/sink.c3
-rw-r--r--src/pulsecore/source-output.c6
3 files changed, 6 insertions, 16 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 8bc434ea..cc3e108a 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -351,7 +351,7 @@ static void update_n_corked(pa_sink_input *i, pa_sink_input_state_t state) {
}
/* Called from main context */
-static int sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
+static void sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
pa_sink_input *ssync;
pa_assert(i);
@@ -359,7 +359,7 @@ static int sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
state = PA_SINK_INPUT_RUNNING;
if (i->state == state)
- return 0;
+ return;
pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL) == 0);
@@ -386,8 +386,6 @@ static int sink_input_set_state(pa_sink_input *i, pa_sink_input_state_t state) {
}
pa_sink_update_status(i->sink);
-
- return 0;
}
/* Called from main context */
@@ -553,7 +551,7 @@ pa_usec_t pa_sink_input_get_latency(pa_sink_input *i, pa_usec_t *sink_latency) {
}
/* Called from thread context */
-int pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, pa_memchunk *chunk, pa_cvolume *volume) {
+void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, pa_memchunk *chunk, pa_cvolume *volume) {
pa_bool_t do_volume_adj_here;
pa_bool_t volume_is_norm;
size_t block_size_max_sink, block_size_max_sink_input;
@@ -567,9 +565,6 @@ int pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, pa
/* pa_log_debug("peek"); */
- if (!i->pop)
- return -1;
-
pa_assert(i->thread_info.state == PA_SINK_INPUT_RUNNING ||
i->thread_info.state == PA_SINK_INPUT_CORKED ||
i->thread_info.state == PA_SINK_INPUT_DRAINED);
@@ -696,8 +691,6 @@ int pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink frames */, pa
pa_cvolume_mute(volume, i->sink->sample_spec.channels);
else
*volume = i->thread_info.soft_volume;
-
- return 0;
}
/* Called from thread context */
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index a3b6b146..0c297ec3 100644
--- a/src/pulsecore/sink.c
+++ b/src/pulsecore/sink.c
@@ -584,8 +584,7 @@ static unsigned fill_mix_info(pa_sink *s, size_t *length, pa_mix_info *info, uns
while ((i = pa_hashmap_iterate(s->thread_info.inputs, &state, NULL)) && maxinfo > 0) {
pa_sink_input_assert_ref(i);
- if (pa_sink_input_peek(i, *length, &info->chunk, &info->volume) < 0)
- continue;
+ pa_sink_input_peek(i, *length, &info->chunk, &info->volume);
if (mixlength == 0 || info->chunk.length < mixlength)
mixlength = info->chunk.length;
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index 9ef9b500..0204e300 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -265,11 +265,11 @@ static void update_n_corked(pa_source_output *o, pa_source_output_state_t state)
}
/* Called from main context */
-static int source_output_set_state(pa_source_output *o, pa_source_output_state_t state) {
+static void source_output_set_state(pa_source_output *o, pa_source_output_state_t state) {
pa_assert(o);
if (o->state == state)
- return 0;
+ return;
pa_assert_se(pa_asyncmsgq_send(o->source->asyncmsgq, PA_MSGOBJECT(o), PA_SOURCE_OUTPUT_MESSAGE_SET_STATE, PA_UINT_TO_PTR(state), 0, NULL) == 0);
@@ -280,8 +280,6 @@ static int source_output_set_state(pa_source_output *o, pa_source_output_state_t
pa_hook_fire(&o->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_STATE_CHANGED], o);
pa_source_update_status(o->source);
-
- return 0;
}
/* Called from main context */