mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
make a couple of functions return proper error codes
This commit is contained in:
parent
162e43b306
commit
08800c35b0
15 changed files with 122 additions and 105 deletions
|
|
@ -799,7 +799,7 @@ static int output_create_sink_input(struct output *o) {
|
|||
data.module = o->userdata->module;
|
||||
data.resample_method = o->userdata->resample_method;
|
||||
|
||||
o->sink_input = pa_sink_input_new(o->userdata->core, &data, PA_SINK_INPUT_VARIABLE_RATE|PA_SINK_INPUT_DONT_MOVE);
|
||||
pa_sink_input_new(&o->sink_input, o->userdata->core, &data, PA_SINK_INPUT_VARIABLE_RATE|PA_SINK_INPUT_DONT_MOVE);
|
||||
|
||||
pa_sink_input_new_data_done(&data);
|
||||
|
||||
|
|
|
|||
|
|
@ -732,7 +732,7 @@ int pa__init(pa_module*m) {
|
|||
pa_sink_input_new_data_set_sample_spec(&sink_input_data, &ss);
|
||||
pa_sink_input_new_data_set_channel_map(&sink_input_data, &map);
|
||||
|
||||
u->sink_input = pa_sink_input_new(m->core, &sink_input_data, PA_SINK_INPUT_DONT_MOVE);
|
||||
pa_sink_input_new(&u->sink_input, m->core, &sink_input_data, PA_SINK_INPUT_DONT_MOVE);
|
||||
pa_sink_input_new_data_done(&sink_input_data);
|
||||
|
||||
if (!u->sink_input)
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ int pa__init(pa_module*m) {
|
|||
pa_sink_input_new_data_set_sample_spec(&sink_input_data, &ss);
|
||||
pa_sink_input_new_data_set_channel_map(&sink_input_data, &stream_map);
|
||||
|
||||
u->sink_input = pa_sink_input_new(m->core, &sink_input_data, PA_SINK_INPUT_DONT_MOVE | (remix ? 0 : PA_SINK_INPUT_NO_REMIX));
|
||||
pa_sink_input_new(&u->sink_input, m->core, &sink_input_data, PA_SINK_INPUT_DONT_MOVE | (remix ? 0 : PA_SINK_INPUT_NO_REMIX));
|
||||
pa_sink_input_new_data_done(&sink_input_data);
|
||||
|
||||
if (!u->sink_input)
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ int pa__init(pa_module*m) {
|
|||
pa_proplist_setf(data.proplist, "sine.hz", "%u", frequency);
|
||||
pa_sink_input_new_data_set_sample_spec(&data, &ss);
|
||||
|
||||
u->sink_input = pa_sink_input_new(m->core, &data, 0);
|
||||
pa_sink_input_new(&u->sink_input, m->core, &data, 0);
|
||||
pa_sink_input_new_data_done(&data);
|
||||
|
||||
if (!u->sink_input)
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
|
|||
data.module = u->module;
|
||||
pa_sink_input_new_data_set_sample_spec(&data, &sdp_info->sample_spec);
|
||||
|
||||
s->sink_input = pa_sink_input_new(u->module->core, &data, 0);
|
||||
pa_sink_input_new(&s->sink_input, u->module->core, &data, 0);
|
||||
pa_sink_input_new_data_done(&data);
|
||||
|
||||
if (!s->sink_input) {
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ int pa__init(pa_module*m) {
|
|||
pa_source_output_new_data_set_sample_spec(&data, &ss);
|
||||
pa_source_output_new_data_set_channel_map(&data, &cm);
|
||||
|
||||
o = pa_source_output_new(m->core, &data, PA_SOURCE_OUTPUT_DONT_INHIBIT_AUTO_SUSPEND);
|
||||
pa_source_output_new(&o, m->core, &data, PA_SOURCE_OUTPUT_DONT_INHIBIT_AUTO_SUSPEND);
|
||||
pa_source_output_new_data_done(&data);
|
||||
|
||||
if (!o) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue