mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-21 08:56:46 -05:00
after calling PA_CORE_HOOK_SINK_SET_VOLUME hook, check again whether the volume changed
This commit is contained in:
parent
46f73fb953
commit
68cc2996cc
1 changed files with 6 additions and 2 deletions
|
|
@ -856,8 +856,12 @@ void pa_sink_set_volume(pa_sink *s, const pa_cvolume *volume) {
|
||||||
|
|
||||||
changed = !pa_cvolume_equal(&data.volume, &s->volume);
|
changed = !pa_cvolume_equal(&data.volume, &s->volume);
|
||||||
|
|
||||||
if (changed && pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_SET_VOLUME], &data) < 0)
|
if (changed) {
|
||||||
return;
|
if (pa_hook_fire(&s->core->hooks[PA_CORE_HOOK_SINK_SET_VOLUME], &data) < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
changed = !pa_cvolume_equal(&data.volume, &s->volume);
|
||||||
|
}
|
||||||
|
|
||||||
s->volume = data.volume;
|
s->volume = data.volume;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue