If deferred volumes were activated, set_volume does not really set
the volume, and is probably only meant to be called from the main
thread.
As we're currently really setting the port and the mute here (i e
modifying ALSA), we should really modify the volume as well.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
if (s->set_mute)
s->set_mute(s);
if (s->set_mute)
s->set_mute(s);
- if (s->set_volume)
- s->set_volume(s);
+ if (s->flags & PA_SINK_DEFERRED_VOLUME) {
+ if (s->write_volume)
+ s->write_volume(s);
+ } else {
+ if (s->set_volume)
+ s->set_volume(s);
+ }
if (s->set_mute)
s->set_mute(s);
if (s->set_mute)
s->set_mute(s);
- if (s->set_volume)
- s->set_volume(s);
+ if (s->flags & PA_SOURCE_DEFERRED_VOLUME) {
+ if (s->write_volume)
+ s->write_volume(s);
+ } else {
+ if (s->set_volume)
+ s->set_volume(s);
+ }