mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
volume: fix definition of PA_VOLUME_MAX and introduce PA_VOLUME_INVALID and use it wherever applicable
This commit is contained in:
parent
5cf0c1e544
commit
3bbc5e6a4d
5 changed files with 17 additions and 14 deletions
|
|
@ -335,12 +335,12 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t
|
|||
|
||||
pass_volume = TRUE;
|
||||
|
||||
if (e->volume_is_set && volume != (pa_volume_t) -1) {
|
||||
if (e->volume_is_set && volume != PA_VOLUME_INVALID) {
|
||||
pa_cvolume_set(&r, e->sample_spec.channels, volume);
|
||||
pa_sw_cvolume_multiply(&r, &r, &e->volume);
|
||||
} else if (e->volume_is_set)
|
||||
r = e->volume;
|
||||
else if (volume != (pa_volume_t) -1)
|
||||
else if (volume != PA_VOLUME_INVALID)
|
||||
pa_cvolume_set(&r, e->sample_spec.channels, volume);
|
||||
else
|
||||
pass_volume = FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue