diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-08-19 02:55:02 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-08-19 02:55:02 +0200 |
commit | 8c31974f56ebbbfc1a4978150026acf77c32689e (patch) | |
tree | 3078845a45638377a5d181695ed352dd32bf44cb /src/modules/module-mmkbd-evdev.c | |
parent | 5207e191424675df74059aaf30f9b1292a05cb5d (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/modules/module-mmkbd-evdev.c')
-rw-r--r-- | src/modules/module-mmkbd-evdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/module-mmkbd-evdev.c b/src/modules/module-mmkbd-evdev.c index b30fae51..7be48700 100644 --- a/src/modules/module-mmkbd-evdev.c +++ b/src/modules/module-mmkbd-evdev.c @@ -102,7 +102,7 @@ static void io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_io_event pa_log("Failed to get sink '%s'", u->sink_name); else { int i; - pa_cvolume cv = *pa_sink_get_volume(s, FALSE, FALSE); + pa_cvolume cv = *pa_sink_get_volume(s, FALSE); #define DELTA (PA_VOLUME_NORM/20) @@ -115,7 +115,7 @@ static void io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_io_event cv.values[i] = PA_VOLUME_MAX; } - pa_sink_set_volume(s, &cv, TRUE, TRUE, TRUE, TRUE); + pa_sink_set_volume(s, &cv, TRUE, TRUE); break; case DOWN: @@ -126,7 +126,7 @@ static void io_callback(pa_mainloop_api *io, pa_io_event *e, int fd, pa_io_event cv.values[i] = PA_VOLUME_MUTED; } - pa_sink_set_volume(s, &cv, TRUE, TRUE, TRUE, TRUE); + pa_sink_set_volume(s, &cv, TRUE, TRUE); break; case MUTE_TOGGLE: |