summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/protocol-native.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-19 02:55:02 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-19 02:55:02 +0200
commit8c31974f56ebbbfc1a4978150026acf77c32689e (patch)
tree3078845a45638377a5d181695ed352dd32bf44cb /src/pulsecore/protocol-native.c
parent5207e191424675df74059aaf30f9b1292a05cb5d (diff)
sink: volume handling rework, new flat volume logic
- We now implement a logic where the sink maintains two distinct volumes: the 'reference' volume which is shown to the users, and the 'real' volume, which is configured to the hardware. The latter is configured to the max of all streams. Volume changes on sinks are propagated back to the streams proportional to the reference volume change. Volume changes on sink inputs are forwarded to the sink by 'pushing' the volume if necessary. This renames the old 'virtual_volume' to 'real_volume'. The 'reference_volume' is now the one exposed to users. By this logic the sink volume visible to the user, will always be the "upper" boundary for everything that is played. Saved/restored stream volumes are measured relative to this boundary, the factor here is always < 1.0. - introduce accuracy for sink volumes, similar to the accuracy we already have for source volumes. - other cleanups.
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 280707e2..b1285e15 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -2840,7 +2840,7 @@ static void sink_fill_tagstruct(pa_native_connection *c, pa_tagstruct *t, pa_sin
PA_TAG_SAMPLE_SPEC, &fixed_ss,
PA_TAG_CHANNEL_MAP, &sink->channel_map,
PA_TAG_U32, sink->module ? sink->module->index : PA_INVALID_INDEX,
- PA_TAG_CVOLUME, pa_sink_get_volume(sink, FALSE, FALSE),
+ PA_TAG_CVOLUME, pa_sink_get_volume(sink, FALSE),
PA_TAG_BOOLEAN, pa_sink_get_mute(sink, FALSE),
PA_TAG_U32, sink->monitor_source ? sink->monitor_source->index : PA_INVALID_INDEX,
PA_TAG_STRING, sink->monitor_source ? sink->monitor_source->name : NULL,
@@ -3388,7 +3388,7 @@ static void command_set_volume(
if (sink) {
pa_log_debug("Client %s changes volume of sink %s.", client_name, sink->name);
- pa_sink_set_volume(sink, &volume, TRUE, TRUE, TRUE, TRUE);
+ pa_sink_set_volume(sink, &volume, TRUE, TRUE);
} else if (source) {
pa_log_debug("Client %s changes volume of sink %s.", client_name, source->name);
pa_source_set_volume(source, &volume, TRUE);