]> code.delx.au - pulseaudio/commit
sink,source: Avoid unnecessary call to pa_rtclock_now()
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 27 Sep 2011 16:22:24 +0000 (21:52 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 27 Sep 2011 17:00:30 +0000 (22:30 +0530)
commit6a9272f950649fdf3650e23d08320093d6ef7a64
treeee7e09b740bd598e8a235900ed11e7911e3173d6
parent6878140662a9de50942dfe9fc24b8139e29289cf
sink,source: Avoid unnecessary call to pa_rtclock_now()

pa_{sink,source}_volume_change_apply were being called by the ALSA I/O
thread on every iteration, causing a pa_rtclock_now() call, which can
sometimes be heavy. We avoid this call by making sure there actually are
changes to apply before proceeding into the function.

While we're at it, also dropping a redundant check on s->write_volume.
src/pulsecore/sink.c
src/pulsecore/source.c