diff options
author | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-12-07 09:16:26 +0000 |
---|---|---|
committer | Mike Blumenkrantz <michael.blumenkrantz@gmail.com> | 2012-12-07 09:16:26 +0000 |
commit | f0326c5a5c1db97a55da1b1ad2be2678fd84267b (patch) | |
tree | b90e9886260c9da28616467f662d55099eb2d49e /src/modules/mixer | |
parent | 492149b38865c58795c2214808d069e552a88dbc (diff) | |
download | enlightenment-f0326c5a5c1db97a55da1b1ad2be2678fd84267b.tar.gz |
only set volume for pulse channel if volume is actually different from current channel value
SVN revision: 80422
Diffstat (limited to 'src/modules/mixer')
-rw-r--r-- | src/modules/mixer/sys_pulse.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/mixer/sys_pulse.c b/src/modules/mixer/sys_pulse.c index 01f0ace61c..d55f675aca 100644 --- a/src/modules/mixer/sys_pulse.c +++ b/src/modules/mixer/sys_pulse.c @@ -545,13 +545,18 @@ e_mixer_pulse_set_volume(E_Mixer_System *self, E_Mixer_Channel *channel, int lef n = pulse_sink_channels_count((void *)self); for (x = 0; x < n; x++) { + double vol; + + vol = lround(pulse_sink_channel_volume_get(self, x)); if (x == 0) { - id |= pulse_sink_channel_volume_set(conn, (void *)self, x, left); + if (vol != left) + id |= pulse_sink_channel_volume_set(conn, (void *)self, x, left); } else if (x == 1) { - id |= pulse_sink_channel_volume_set(conn, (void *)self, x, right); + if (vol != right) + id |= pulse_sink_channel_volume_set(conn, (void *)self, x, right); } } #endif |