- pa_cvolume virtual_volume, soft_volume, volume_factor;
- pa_bool_t muted:1;
-
- /* if TRUE then the source we are connected to and/or the volume
+ /* Also see http://pulseaudio.org/wiki/InternalVolumes */
+ pa_cvolume volume; /* The volume clients are informed about */
+ pa_cvolume reference_ratio; /* The ratio of the stream's volume to the sink's reference volume */
+ pa_cvolume real_ratio; /* The ratio of the stream's volume to the sink's real volume */
+ /* volume_factor is an internally used "additional volume" that can be used
+ * by modules without having the volume visible to clients. volume_factor
+ * calculated by merging all the individual items in volume_factor_items.
+ * Modules must not modify these variables directly, instead
+ * pa_sink_input_add/remove_volume_factor() have to be used to add and
+ * remove items, or pa_sink_input_new_data_add_volume_factor() during input
+ * creation time. */
+ pa_cvolume volume_factor;
+ pa_hashmap *volume_factor_items;
+ pa_cvolume soft_volume; /* The internal software volume we apply to all PCM data while it passes through. Usually calculated as real_ratio * volume_factor */
+
+ pa_cvolume volume_factor_sink; /* A second volume factor in format of the sink this stream is connected to. */
+ pa_hashmap *volume_factor_sink_items;
+
+ bool volume_writable:1;
+
+ bool muted:1;
+
+ /* if true then the sink we are connected to and/or the volume