From e72e75570c97ee9dd1cbce6480d7de8637d470fe Mon Sep 17 00:00:00 2001 From: Tanu Kaskinen Date: Sun, 27 Mar 2011 23:00:26 +0300 Subject: 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. --- src/modules/module-stream-restore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/module-stream-restore.c') diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c index df48dce2..8edfee0c 100644 --- a/src/modules/module-stream-restore.c +++ b/src/modules/module-stream-restore.c @@ -1168,7 +1168,7 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3 } if (sink_input->save_volume) { - pa_assert(pa_sink_input_is_volume_writable(sink_input)); + pa_assert(sink_input->volume_writable); entry.channel_map = sink_input->channel_map; pa_sink_input_get_volume(sink_input, &entry.volume, FALSE); @@ -1329,7 +1329,7 @@ static pa_hook_result_t sink_input_fixate_hook_callback(pa_core *c, pa_sink_inpu if ((e = read_entry(u, name))) { if (u->restore_volume && e->volume_valid) { - if (!pa_sink_input_new_data_is_volume_writable(new_data)) + if (!new_data->volume_writable) pa_log_debug("Not restoring volume for sink input %s, because its volume can't be changed.", name); else if (new_data->volume_is_set) pa_log_debug("Not restoring volume for sink input %s, because already set.", name); @@ -1619,7 +1619,7 @@ static void apply_entry(struct userdata *u, const char *name, struct entry *e) { } pa_xfree(n); - if (u->restore_volume && e->volume_valid && pa_sink_input_is_volume_writable(si)) { + if (u->restore_volume && e->volume_valid && si->volume_writable) { pa_cvolume v; v = e->volume; -- cgit