+ /* If this source output is not realized yet or is being moved, we
+ * have to touch the thread info data directly */
+
+ if (o->source) {
+ if (!(o->source->flags & PA_SOURCE_DYNAMIC_LATENCY))
+ usec = pa_source_get_fixed_latency(o->source);
+
+ if (usec != (pa_usec_t) -1) {
+ pa_usec_t min_latency, max_latency;
+ pa_source_get_latency_range(o->source, &min_latency, &max_latency);
+ usec = PA_CLAMP(usec, min_latency, max_latency);
+ }
+ }
+
+ o->thread_info.requested_source_latency = usec;