Volume: When the context is ready the volume will be queried for an initial value.
1 files changed, 6 insertions(+), 0 deletions(-)

M plugins/volume.c
M plugins/volume.c +6 -0
@@ 55,9 55,15 @@ static void subscribe(pa_context* ctx, p
 }
 
 static void ready(pa_context* ctx, void* data) {
+	struct volume* this = data;
 	if(pa_context_get_state(ctx) == PA_CONTEXT_READY) {
 		pa_context_set_subscribe_callback(ctx, subscribe, data);
 		pa_context_subscribe(ctx, PA_SUBSCRIPTION_MASK_SINK, NULL, NULL);
+		if(this->sink_name == NULL) {
+			pa_context_get_sink_info_by_index(ctx, this->sink, info, this);
+		} else {
+			pa_context_get_sink_info_by_name(ctx, this->sink_name, info, this);
+		}
 	}
 }