[libao] Add a patch fixing pulseaudio buffersize calculations (rhbz#1193688)
Hans de Goede
jwrdegoede at fedoraproject.org
Fri Feb 20 07:23:14 UTC 2015
commit ffb1a19531ccad94c32c4fe2b56a913f75e42d4d
Author: Hans de Goede <hdegoede at redhat.com>
Date: Fri Feb 20 08:23:11 2015 +0100
Add a patch fixing pulseaudio buffersize calculations (rhbz#1193688)
0001-ao_pulse.c-fix-latency-calculation.patch | 26 ++++++++++++++++++++++++++
libao.spec | 7 ++++++-
2 files changed, 32 insertions(+), 1 deletion(-)
---
diff --git a/0001-ao_pulse.c-fix-latency-calculation.patch b/0001-ao_pulse.c-fix-latency-calculation.patch
new file mode 100644
index 0000000..f6a61fc
--- /dev/null
+++ b/0001-ao_pulse.c-fix-latency-calculation.patch
@@ -0,0 +1,26 @@
+From de5547ebc2b0ed37d69889c3c3aec6553d2d84cb Mon Sep 17 00:00:00 2001
+From: Stas Sergeev <stsp at users.sourceforge.net>
+Date: Wed, 18 Feb 2015 00:36:28 +0300
+Subject: [PATCH] ao_pulse.c: fix latency calculation
+
+This fixes periodic underruns with pa plugin.
+---
+ src/plugins/pulse/ao_pulse.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/plugins/pulse/ao_pulse.c b/src/plugins/pulse/ao_pulse.c
+index ff5497f..9c0f64a 100644
+--- a/src/plugins/pulse/ao_pulse.c
++++ b/src/plugins/pulse/ao_pulse.c
+@@ -259,7 +259,7 @@ int ao_plugin_open(ao_device *device, ao_sample_format *format) {
+ battr.prebuf = battr.minreq = battr.fragsize = -1;
+
+ battr.tlength = (int)(internal->buffer_time * format->rate) / 1000000 *
+- ((format->bits+7)/8) + device->output_channels;
++ ((format->bits+7)/8) * device->output_channels;
+ battr.minreq = battr.tlength/4;
+ battr.maxlength = battr.tlength+battr.minreq;
+
+--
+2.1.0
+
diff --git a/libao.spec b/libao.spec
index 0599014..d369b2f 100644
--- a/libao.spec
+++ b/libao.spec
@@ -1,11 +1,12 @@
Name: libao
Version: 1.2.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Cross Platform Audio Output Library
Group: System Environment/Libraries
License: GPLv2+
URL: http://xiph.org/ao/
Source0: http://downloads.xiph.org/releases/ao/%{name}-%{version}.tar.gz
+Patch1: 0001-ao_pulse.c-fix-latency-calculation.patch
BuildRequires: alsa-lib-devel
BuildRequires: pkgconfig(libpulse)
@@ -26,6 +27,7 @@ developing applications that use %{name}.
%prep
%setup -q
+%patch1 -p1
sed -i "s/-O20 -ffast-math//" configure
@@ -64,6 +66,9 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}*
%changelog
+* Fri Feb 20 2015 Hans de Goede <hdegoede at redhat.com> - 1.2.0-4
+- Add a patch fixing pulseaudio buffersize calculations (rhbz#1193688)
+
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
More information about the scm-commits
mailing list