Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build against zita-convolver v4 #69

Closed
falkTX opened this issue Feb 9, 2020 · 4 comments
Closed

Cannot build against zita-convolver v4 #69

falkTX opened this issue Feb 9, 2020 · 4 comments

Comments

@falkTX
Copy link
Contributor

falkTX commented Feb 9, 2020

convolution.cc:32:2: error: #error "This programs requires zita-convolver 3.x.x"
 #error "This programs requires zita-convolver 3.x.x

I imagine this is a problem in a few distributions.
Debian probably already patched it.
EDIT: just checked, debian does not patch anything

@falkTX
Copy link
Contributor Author

falkTX commented Feb 9, 2020

Here is a patch fix:

--- setbfree-0.8.11.orig/b_conv/convolution.cc
+++ setbfree-0.8.11/b_conv/convolution.cc
@@ -28,8 +28,8 @@
 #include <sndfile.h>
 #include <zita-convolver.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.x.x or 4.x.x"
 #endif
 
 #ifndef DFLT_IR_FILE
@@ -182,7 +182,9 @@ initConvolution (
 
 	convproc = new Convproc;
 	convproc->set_options (options);
+#if ZITA_CONVOLVER_MAJOR_VERSION == 3
 	convproc->set_density (dens);
+#endif
 
 	if (convproc->configure (
 	        /*in*/ channels,
@@ -191,6 +193,9 @@ initConvolution (
 	        /*fragm*/ buffersize,
 	        /*min-part*/ buffersize,
 	        /*max-part*/ buffersize /*Convproc::MAXPART*/
+#if ZITA_CONVOLVER_MAJOR_VERSION == 4
+	        , dens /*density*/
+#endif
 	        )) {
 		fprintf (stderr, "\nConvolution: Cannot initialize convolution engine.\n");
 		exit (1);

@x42
Copy link
Collaborator

x42 commented Feb 9, 2020

Do not compile setBfree with ENABLE_CONVOLUTION.
The build-in convolver was a failed experiment, has never been enabled by default, and should not be used as-is.

@falkTX
Copy link
Contributor Author

falkTX commented Feb 9, 2020

Oh, I was not aware of this at all..
can we make the code error out if enabled then?

@x42
Copy link
Collaborator

x42 commented Feb 9, 2020

can we make the code error out if enabled then?

It's potentially useful for some future dev so that'd be tricky. Then again it hasn't been since 8 years so I might just remove it.

@x42 x42 closed this as completed in 9580c7b Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants