]> code.delx.au - pulseaudio/commitdiff
device-port: Add a latency variable to the port struct
authorpoljar <poljarinho@gmail.com>
Fri, 22 Jun 2012 18:55:53 +0000 (20:55 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 25 Jun 2012 16:49:54 +0000 (19:49 +0300)
A latency offset variable was added to the port struct and a function to
set the latency offset.

The latency offset does nothing for now, but it will be later added to
the sink/source latency.

src/pulsecore/device-port.c
src/pulsecore/device-port.h

index 5870913f28a6307f52e40225b7608432d9337d57..ae486a856a2e19c34b155144a6393521c83b3614 100644 (file)
@@ -97,6 +97,7 @@ pa_device_port *pa_device_port_new(pa_core *c, const char *name, const char *des
     p->profiles = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
     p->is_input = FALSE;
     p->is_output = FALSE;
+    p->latency_offset = 0;
     p->proplist = pa_proplist_new();
 
     return p;
@@ -112,3 +113,9 @@ void pa_device_port_hashmap_free(pa_hashmap *h) {
 
     pa_hashmap_free(h, NULL, NULL);
 }
+
+void pa_device_port_set_latency_offset(pa_device_port *p, pa_usec_t offset) {
+    pa_assert(p);
+
+    p->latency_offset = offset;
+}
index 63d5ccf99569bc849b5f5d712f701e3f2084e8fc..5880195753fb66927dccaf1619a249cae7ec0239 100644 (file)
@@ -51,6 +51,7 @@ struct pa_device_port {
     pa_hashmap *profiles; /* Does not own the profiles */
     pa_bool_t is_input:1;
     pa_bool_t is_output:1;
+    pa_usec_t latency_offset;
 
     /* .. followed by some implementation specific data */
 };
@@ -67,4 +68,6 @@ void pa_device_port_hashmap_free(pa_hashmap *h);
 /* The port's available status has changed */
 void pa_device_port_set_available(pa_device_port *p, pa_port_available_t available);
 
+void pa_device_port_set_latency_offset(pa_device_port *p, pa_usec_t offset);
+
 #endif