diff options
Diffstat (limited to 'src/pulsecore/protocol-native.c')
-rw-r--r-- | src/pulsecore/protocol-native.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 21a2cfbc..65b2bb97 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -595,7 +595,7 @@ static record_stream* record_stream_new( int *ret) { record_stream *s; - pa_source_output *source_output; + pa_source_output *source_output = NULL; size_t base; pa_source_output_new_data data; @@ -618,7 +618,7 @@ static record_stream* record_stream_new( if (peak_detect) data.resample_method = PA_RESAMPLER_PEAKS; - *ret = pa_source_output_new(&source_output, c->protocol->core, &data, flags); + *ret = -pa_source_output_new(&source_output, c->protocol->core, &data, flags); pa_source_output_new_data_done(&data); @@ -971,7 +971,7 @@ static playback_stream* playback_stream_new( int *ret) { playback_stream *s, *ssync; - pa_sink_input *sink_input; + pa_sink_input *sink_input = NULL; pa_memchunk silence; uint32_t idx; int64_t start_index; @@ -1018,12 +1018,12 @@ static playback_stream* playback_stream_new( pa_sink_input_new_data_set_sample_spec(&data, ss); pa_sink_input_new_data_set_channel_map(&data, map); if (volume) - pa_sink_input_new_data_set_virtual_volume(&data, volume); + pa_sink_input_new_data_set_volume(&data, volume); if (muted_set) pa_sink_input_new_data_set_muted(&data, muted); data.sync_base = ssync ? ssync->sink_input : NULL; - *ret = pa_sink_input_new(&sink_input, c->protocol->core, &data, flags); + *ret = -pa_sink_input_new(&sink_input, c->protocol->core, &data, flags); pa_sink_input_new_data_done(&data); @@ -2295,11 +2295,9 @@ static void command_set_client_name(pa_pdispatch *pd, uint32_t command, uint32_t return; } - pa_proplist_update(c->client->proplist, PA_UPDATE_REPLACE, p); + pa_client_update_proplist(c->client, PA_UPDATE_REPLACE, p); pa_proplist_free(p); - pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_CHANGE, c->client->index); - reply = reply_new(tag); if (c->version >= 13) @@ -3551,8 +3549,7 @@ static void command_update_proplist(pa_pdispatch *pd, uint32_t command, uint32_t CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY); CHECK_VALIDITY(c->pstream, playback_stream_isinstance(s), tag, PA_ERR_NOENTITY); - pa_proplist_update(s->sink_input->proplist, mode, p); - pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_CHANGE, s->sink_input->index); + pa_sink_input_update_proplist(s->sink_input, mode, p); } else if (command == PA_COMMAND_UPDATE_RECORD_STREAM_PROPLIST) { record_stream *s; @@ -3560,13 +3557,11 @@ static void command_update_proplist(pa_pdispatch *pd, uint32_t command, uint32_t s = pa_idxset_get_by_index(c->record_streams, idx); CHECK_VALIDITY(c->pstream, s, tag, PA_ERR_NOENTITY); - pa_proplist_update(s->source_output->proplist, mode, p); - pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT|PA_SUBSCRIPTION_EVENT_CHANGE, s->source_output->index); + pa_source_output_update_proplist(s->source_output, mode, p); } else { pa_assert(command == PA_COMMAND_UPDATE_CLIENT_PROPLIST); - pa_proplist_update(c->client->proplist, mode, p); - pa_subscription_post(c->protocol->core, PA_SUBSCRIPTION_EVENT_CLIENT|PA_SUBSCRIPTION_EVENT_CHANGE, c->client->index); + pa_client_update_proplist(c->client, mode, p); } pa_pstream_send_simple_ack(c->pstream, tag); |