mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
61 lines
1.9 KiB
Diff
61 lines
1.9 KiB
Diff
From f814f1ef95d3d4a89a1dbb8a8319879ad411f25f Mon Sep 17 00:00:00 2001
|
|
From: Robin Gareus <robin@gareus.org>
|
|
Date: Wed, 6 Jun 2018 19:22:43 +0200
|
|
Subject: [PATCH] Update for libzita-convolver-4 compatibility
|
|
|
|
---
|
|
Makefile | 2 +-
|
|
convolution.cc | 9 +++++++--
|
|
2 files changed, 8 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index 6d7f1a9..6e14710 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -70,7 +70,7 @@ endif
|
|
|
|
ifeq ($(LIBZITACONVOLVER),)
|
|
ifeq ($(shell test -f /usr/include/zita-convolver.h -o -f /usr/local/include/zita-convolver.h || echo no ), no)
|
|
- $(error "libzita-convolver3, is required")
|
|
+ $(error "libzita-convolver3 or 4, is required")
|
|
endif
|
|
LOADLIBES += -lzita-convolver
|
|
endif
|
|
diff --git a/convolution.cc b/convolution.cc
|
|
index c3bea41..6ace44b 100644
|
|
--- a/convolution.cc
|
|
+++ b/convolution.cc
|
|
@@ -47,8 +47,8 @@
|
|
#include <samplerate.h>
|
|
#include "convolution.h"
|
|
|
|
-#if ZITA_CONVOLVER_MAJOR_VERSION != 3
|
|
-# error "This programs requires zita-convolver 3.x.x"
|
|
+#if ZITA_CONVOLVER_MAJOR_VERSION != 3 && ZITA_CONVOLVER_MAJOR_VERSION != 4
|
|
+# error "This programs requires zita-convolver 3 or 4"
|
|
#endif
|
|
|
|
#ifndef SRC_QUALITY // alternatives: SRC_SINC_FASTEST, SRC_SINC_MEDIUM_QUALITY, (SRC_ZERO_ORDER_HOLD, SRC_LINEAR)
|
|
@@ -344,7 +344,9 @@ int clv_initialize (
|
|
|
|
clv->convproc = new Convproc;
|
|
clv->convproc->set_options (options);
|
|
+#if ZITA_CONVOLVER_MAJOR_VERSION == 3
|
|
clv->convproc->set_density (clv->density);
|
|
+#endif
|
|
|
|
if (audiofile_read (clv->ir_fn, sample_rate, &p, &n_chan, &n_frames)) {
|
|
fprintf(stderr, "convoLV2: failed to read IR.\n");
|
|
@@ -379,6 +381,9 @@ int clv_initialize (
|
|
/*quantum*/ buffersize,
|
|
/*min-part*/ buffersize /* must be >= fragm */,
|
|
/*max-part*/ buffersize /* Convproc::MAXPART -> stich output every period */
|
|
+#if ZITA_CONVOLVER_MAJOR_VERSION == 4
|
|
+ , clv->density
|
|
+#endif
|
|
)) {
|
|
fprintf (stderr, "convoLV2: Cannot initialize convolution engine.\n");
|
|
goto errout;
|
|
--
|
|
2.18.0
|
|
|