From 2122c2a79c8fb47a8782dc09ba743abb6314b48d Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Thu, 6 Aug 2015 20:08:34 +0000
Subject: libsoxr: initial inclusion. dep of ffmpeg

---
 ...tual-SOXR_MINIMUM_PHASE-and-SOXR_INTERMED.patch | 26 ++++++++++
 abs/extra/libsoxr/PKGBUILD                         | 55 ++++++++++++++++++++++
 2 files changed, 81 insertions(+)
 create mode 100644 abs/extra/libsoxr/0001-fix-ineffectual-SOXR_MINIMUM_PHASE-and-SOXR_INTERMED.patch
 create mode 100644 abs/extra/libsoxr/PKGBUILD

diff --git a/abs/extra/libsoxr/0001-fix-ineffectual-SOXR_MINIMUM_PHASE-and-SOXR_INTERMED.patch b/abs/extra/libsoxr/0001-fix-ineffectual-SOXR_MINIMUM_PHASE-and-SOXR_INTERMED.patch
new file mode 100644
index 0000000..c55d81b
--- /dev/null
+++ b/abs/extra/libsoxr/0001-fix-ineffectual-SOXR_MINIMUM_PHASE-and-SOXR_INTERMED.patch
@@ -0,0 +1,26 @@
+From fb8657b4469f864f9722d28bbb86c9b8a53446ac Mon Sep 17 00:00:00 2001
+From: Rob Sykes <rob@rob-Ideapad-S205.(none)>
+Date: Sun, 7 Apr 2013 07:39:36 +0100
+Subject: [PATCH 1/1] fix ineffectual SOXR_MINIMUM_PHASE and
+ SOXR_INTERMEDIATE_PHASE in soxr_quality_spec recipe
+
+---
+ src/soxr.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/soxr.c b/src/soxr.c
+index 93dd9c1..36b0251 100644
+--- a/src/soxr.c
++++ b/src/soxr.c
+@@ -85,7 +85,7 @@ soxr_quality_spec_t soxr_quality_spec(unsigned long recipe, unsigned long flags)
+     quality = 6;
+   else if (quality > 10)
+     quality = 0;
+-  p->phase_response = "\62\31\144"[(recipe & 0x30)>>8];
++  p->phase_response = "\62\31\144"[(recipe & 0x30) >> 4];
+   p->stopband_begin = 1;
+   p->precision = !quality? 0: quality < 3? 16 : quality < 8? 4 + quality * 4 : 55 - quality * 4;
+   rej = p->precision * linear_to_dB(2.);
+-- 
+2.3.5
+
diff --git a/abs/extra/libsoxr/PKGBUILD b/abs/extra/libsoxr/PKGBUILD
new file mode 100644
index 0000000..b3b4a6e
--- /dev/null
+++ b/abs/extra/libsoxr/PKGBUILD
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Anatol Pomozov
+# Contributor: JSpaces <jspace -aT- unseen -d0T- is>
+# Contributor: Triode <triode1 -aT- btinternet -d0t- com>
+
+pkgname=libsoxr
+pkgver=0.1.1
+pkgrel=3
+pkgdesc='The SoX Resampler library that aims to give fast and high quality results for any constant resampling ratio'
+arch=(i686 x86_64) 
+url='http://sourceforge.net/p/soxr/wiki/Home/'
+license=(GPL)
+depends=(gcc-libs)
+makedepends=(cmake)
+options=(!emptydirs)
+source=(http://downloads.sourceforge.net/project/soxr/soxr-$pkgver-Source.tar.xz
+        0001-fix-ineffectual-SOXR_MINIMUM_PHASE-and-SOXR_INTERMED.patch)
+sha1sums=('f5d90e375db3914a522fef477898bde8c70243e7'
+          '73e6a3418001ce01aa16c3d8e29e2535d0158111')
+
+prepare() {
+  cd soxr-$pkgver-Source
+  patch -p1 < "$srcdir"/0001-fix-ineffectual-SOXR_MINIMUM_PHASE-and-SOXR_INTERMED.patch
+}
+
+build() {
+  cd soxr-$pkgver-Source
+  cmake \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DBUILD_EXAMPLES=OFF \
+    -DBUILD_SHARED_LIBS=ON \
+    -DCMAKE_BUILD_TYPE=Release \
+    -DVISIBILITY_HIDDENL=ON \
+    -DWITH_AVFFT=ON \
+    -DWITH_DOUBLE_PRECISION=ON \
+    -DWITH_LSR_BINDINGS=ON \
+    -DWITH_OPENMP=ON \
+    -DWITH_PFFFT=ON \
+    -DWITH_SIMD=ON \
+    .
+  make
+}
+
+check() {
+  cd soxr-$pkgver-Source
+  make test
+}
+
+package() {
+  cd soxr-$pkgver-Source
+  
+  make DESTDIR="$pkgdir" install
+  install -Dm644 LICENCE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+  rm -r "$pkgdir"/usr/share/doc/$pkgname/
+}
-- 
cgit v0.12