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:
Tanu Kaskinen 2011-03-27 23:00:26 +03:00 committed by Colin Guthrie
parent b358f1c71d
commit e72e75570c
9 changed files with 27 additions and 47 deletions

View file

@ -3089,7 +3089,7 @@ static void sink_input_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t,
pa_tagstruct_put_boolean(t, (pa_sink_input_get_state(s) == PA_SINK_INPUT_CORKED));
if (c->version >= 20) {
pa_tagstruct_put_boolean(t, has_volume);
pa_tagstruct_put_boolean(t, has_volume ? !pa_sink_input_is_volume_writable(s) : FALSE);
pa_tagstruct_put_boolean(t, s->volume_writable);
}
}
@ -3472,7 +3472,7 @@ static void command_set_volume(
pa_log_debug("Client %s changes volume of source %s.", client_name, source->name);
pa_source_set_volume(source, &volume, TRUE);
} else if (si) {
CHECK_VALIDITY(c->pstream, pa_sink_input_is_volume_writable(si), tag, PA_ERR_INVALID);
CHECK_VALIDITY(c->pstream, si->volume_writable, tag, PA_ERR_BADSTATE);
CHECK_VALIDITY(c->pstream, volume.channels == 1 || pa_cvolume_compatible(&volume, &si->sample_spec), tag, PA_ERR_INVALID);
pa_log_debug("Client %s changes volume of sink input %s.",