mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-18 08:56:40 -05:00
volume: Clamp volume to PA_VOLUME_MAX
This ensures that we always clamp the volume to PA_VOLUME_MAX. While this currently has no effect, it will be required for making sure we don't exceed PA_VOLUME_MAX when its value changes in the future.
This commit is contained in:
parent
1d2ef7923d
commit
49101fc540
7 changed files with 24 additions and 19 deletions
|
|
@ -127,7 +127,7 @@ static int load_rules(struct userdata *u, const char *filename) {
|
|||
|
||||
*d = 0;
|
||||
if (pa_atou(v, &k) >= 0) {
|
||||
volume = (pa_volume_t) k;
|
||||
volume = (pa_volume_t) PA_CLAMP_VOLUME(k);
|
||||
} else if (*v == '"') {
|
||||
char *e;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue