Blame SOURCES/0001-ao_pulse.c-fix-latency-calculation.patch

2977ff
From de5547ebc2b0ed37d69889c3c3aec6553d2d84cb Mon Sep 17 00:00:00 2001
2977ff
From: Stas Sergeev <stsp@users.sourceforge.net>
2977ff
Date: Wed, 18 Feb 2015 00:36:28 +0300
2977ff
Subject: [PATCH] ao_pulse.c: fix latency calculation
2977ff
2977ff
This fixes periodic underruns with pa plugin.
2977ff
---
2977ff
 src/plugins/pulse/ao_pulse.c | 2 +-
2977ff
 1 file changed, 1 insertion(+), 1 deletion(-)
2977ff
2977ff
diff --git a/src/plugins/pulse/ao_pulse.c b/src/plugins/pulse/ao_pulse.c
2977ff
index ff5497f..9c0f64a 100644
2977ff
--- a/src/plugins/pulse/ao_pulse.c
2977ff
+++ b/src/plugins/pulse/ao_pulse.c
2977ff
@@ -259,7 +259,7 @@ int ao_plugin_open(ao_device *device, ao_sample_format *format) {
2977ff
     battr.prebuf = battr.minreq = battr.fragsize = -1;
2977ff
 
2977ff
     battr.tlength = (int)(internal->buffer_time * format->rate) / 1000000 *
2977ff
-      ((format->bits+7)/8) + device->output_channels;
2977ff
+      ((format->bits+7)/8) * device->output_channels;
2977ff
     battr.minreq = battr.tlength/4;
2977ff
     battr.maxlength = battr.tlength+battr.minreq;
2977ff
 
2977ff
-- 
2977ff
2.1.0
2977ff