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

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