summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/protocol-native.c
diff options
context:
space:
mode:
authorTanu Kaskinen <tanuk@iki.fi>2011-03-27 23:00:26 +0300
committerColin Guthrie <colin@mageia.org>2011-03-29 21:18:06 +0100
commite72e75570c97ee9dd1cbce6480d7de8637d470fe (patch)
treeb5672949bd2e92df2b7559855f19642d1eb44aa8 /src/pulsecore/protocol-native.c
parentb358f1c71d633adcbef02b583120d9ab1a8ac69e (diff)
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.
Diffstat (limited to 'src/pulsecore/protocol-native.c')
-rw-r--r--src/pulsecore/protocol-native.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index bb4be726..4952ee41 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -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.",