mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
sink-input: Add volume_writable to pa_sink_input.
This is pretty cosmetic change; there's no actual functionality added. Previously the volume_writable information was available through the pa_sink_input_is_volume_writable() function, but I find it cleaner to have a real variable. The sink input introspection variable name was also changed from read_only_volume to volume_writable for consistency.
This commit is contained in:
parent
b358f1c71d
commit
e72e75570c
9 changed files with 27 additions and 47 deletions
|
|
@ -995,7 +995,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
|
|||
|
||||
while (!pa_tagstruct_eof(t)) {
|
||||
pa_sink_input_info i;
|
||||
pa_bool_t mute = FALSE, corked = FALSE, has_volume = FALSE, read_only_volume = FALSE;
|
||||
pa_bool_t mute = FALSE, corked = FALSE, has_volume = FALSE, volume_writable = TRUE;
|
||||
|
||||
pa_zero(i);
|
||||
i.proplist = pa_proplist_new();
|
||||
|
|
@ -1016,7 +1016,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
|
|||
(o->context->version >= 13 && pa_tagstruct_get_proplist(t, i.proplist) < 0) ||
|
||||
(o->context->version >= 19 && pa_tagstruct_get_boolean(t, &corked) < 0) ||
|
||||
(o->context->version >= 20 && (pa_tagstruct_get_boolean(t, &has_volume) < 0 ||
|
||||
pa_tagstruct_get_boolean(t, &read_only_volume) < 0))) {
|
||||
pa_tagstruct_get_boolean(t, &volume_writable) < 0))) {
|
||||
|
||||
pa_context_fail(o->context, PA_ERR_PROTOCOL);
|
||||
pa_proplist_free(i.proplist);
|
||||
|
|
@ -1026,7 +1026,7 @@ static void context_get_sink_input_info_callback(pa_pdispatch *pd, uint32_t comm
|
|||
i.mute = (int) mute;
|
||||
i.corked = (int) corked;
|
||||
i.has_volume = (int) has_volume;
|
||||
i.read_only_volume = (int) read_only_volume;
|
||||
i.volume_writable = (int) volume_writable;
|
||||
|
||||
if (o->callback) {
|
||||
pa_sink_input_info_cb_t cb = (pa_sink_input_info_cb_t) o->callback;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue