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

@ -104,6 +104,8 @@ struct pa_sink_input {
pa_cvolume volume_factor_sink; /* A second volume factor in format of the sink this stream is connected to */
pa_bool_t volume_writable:1;
pa_bool_t muted:1;
/* if TRUE then the source we are connected to and/or the volume
@ -289,13 +291,14 @@ typedef struct pa_sink_input_new_data {
pa_bool_t volume_is_absolute:1;
pa_bool_t volume_writable:1;
pa_bool_t save_sink:1, save_volume:1, save_muted:1;
} pa_sink_input_new_data;
pa_sink_input_new_data* pa_sink_input_new_data_init(pa_sink_input_new_data *data);
void pa_sink_input_new_data_set_sample_spec(pa_sink_input_new_data *data, const pa_sample_spec *spec);
void pa_sink_input_new_data_set_channel_map(pa_sink_input_new_data *data, const pa_channel_map *map);
pa_bool_t pa_sink_input_new_data_is_volume_writable(pa_sink_input_new_data *data);
void pa_sink_input_new_data_set_volume(pa_sink_input_new_data *data, const pa_cvolume *volume);
void pa_sink_input_new_data_apply_volume_factor(pa_sink_input_new_data *data, const pa_cvolume *volume_factor);
void pa_sink_input_new_data_apply_volume_factor_sink(pa_sink_input_new_data *data, const pa_cvolume *volume_factor);
@ -341,7 +344,6 @@ void pa_sink_input_kill(pa_sink_input*i);
pa_usec_t pa_sink_input_get_latency(pa_sink_input *i, pa_usec_t *sink_latency);
pa_bool_t pa_sink_input_is_volume_readable(pa_sink_input *i);
pa_bool_t pa_sink_input_is_volume_writable(pa_sink_input *i);
void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, pa_bool_t save, pa_bool_t absolute);
pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, pa_bool_t absolute);