[pulseaudio-discuss] [PATCH 1/2] combine-sink: Use PA_MAX instead of ternary operator for clarity

Arun Raghavan arun at arunraghavan.net
Thu Mar 9 04:36:05 UTC 2017


---
 src/modules/module-combine-sink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/module-combine-sink.c b/src/modules/module-combine-sink.c
index 250240a..71d1fba 100644
--- a/src/modules/module-combine-sink.c
+++ b/src/modules/module-combine-sink.c
@@ -227,7 +227,7 @@ static void adjust_rates(struct userdata *u) {
 
     avg_total_latency /= n;
 
-    target_latency = max_sink_latency > min_total_latency ? max_sink_latency : min_total_latency;
+    target_latency = PA_MAX(max_sink_latency, min_total_latency);
 
     pa_log_info("[%s] avg total latency is %0.2f msec.", u->sink->name, (double) avg_total_latency / PA_USEC_PER_MSEC);
     pa_log_info("[%s] target latency is %0.2f msec.", u->sink->name, (double) target_latency / PA_USEC_PER_MSEC);
-- 
2.9.3



More information about the pulseaudio-discuss mailing list