]> code.delx.au - pulseaudio/commitdiff
device-port: Return early from pa_device_port_set_latency_offset() if the offset...
authorTanu Kaskinen <tanuk@iki.fi>
Tue, 22 Jan 2013 06:48:02 +0000 (08:48 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Tue, 22 Jan 2013 06:48:02 +0000 (08:48 +0200)
This avoids sending change notifications when nothing changes.

src/pulsecore/device-port.c

index fa78e08b4337b87835bd25d6548780899b4a4c42..6d787aca2d28b1c55d6d7588880cc10020e3d807 100644 (file)
@@ -104,6 +104,9 @@ void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset) {
 
     pa_assert(p);
 
+    if (offset == p->latency_offset)
+        return;
+
     p->latency_offset = offset;
 
     if (p->is_output) {