[Asterisk-code-review] bridge softmix binaural: Enable FFTW3 in Solaris 11. (asterisk[15])

Kevin Harwell asteriskteam at digium.com
Thu Jul 5 16:19:27 CDT 2018


Kevin Harwell has submitted this change and it was merged. ( https://gerrit.asterisk.org/9290 )

Change subject: bridge_softmix_binaural: Enable FFTW3 in Solaris 11.
......................................................................

bridge_softmix_binaural: Enable FFTW3 in Solaris 11.

ASTERISK-27939

Change-Id: Ice5640e08385a64a0a6555deaccd91e86bca154f
---
M bridges/bridge_softmix/bridge_softmix_binaural.c
M configure
M configure.ac
3 files changed, 14 insertions(+), 14 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Matthew Fredrickson: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved; Approved for Submit



diff --git a/bridges/bridge_softmix/bridge_softmix_binaural.c b/bridges/bridge_softmix/bridge_softmix_binaural.c
index 2a8efd7..3a036cd 100644
--- a/bridges/bridge_softmix/bridge_softmix_binaural.c
+++ b/bridges/bridge_softmix/bridge_softmix_binaural.c
@@ -193,12 +193,12 @@
 	float *hrir;
 
 	/* Prepare FFTW. */
-	channel->fftw_in = fftw_alloc_real(hrtf_len + 1);
+	channel->fftw_in = (double *) fftw_malloc(sizeof(double) * (hrtf_len + 1));
 	if (channel->fftw_in == NULL) {
 		return -1;
 	}
 
-	channel->fftw_out = fftw_alloc_real(hrtf_len + 1);
+	channel->fftw_out = (double *) fftw_malloc(sizeof(double) * (hrtf_len + 1));
 	if (channel->fftw_out == NULL) {
 		fftw_free(channel->fftw_in);
 		return -1;
@@ -239,7 +239,7 @@
 	}
 
 	fftw_execute(channel->fftw_plan);
-	channel->hrtf = fftw_alloc_real(hrtf_len);
+	channel->hrtf = (double *) fftw_malloc(sizeof(double) * hrtf_len);
 	if (channel->hrtf == NULL) {
 		fftw_free(channel->fftw_in);
 		fftw_free(channel->fftw_out);
diff --git a/configure b/configure
index 5d52867..d0aa138 100755
--- a/configure
+++ b/configure
@@ -28544,9 +28544,9 @@
 
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} "
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_alloc_real in -lfftw3" >&5
-$as_echo_n "checking for fftw_alloc_real in -lfftw3... " >&6; }
-if ${ac_cv_lib_fftw3_fftw_alloc_real+:} false; then :
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_malloc in -lfftw3" >&5
+$as_echo_n "checking for fftw_malloc in -lfftw3... " >&6; }
+if ${ac_cv_lib_fftw3_fftw_malloc+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
@@ -28560,27 +28560,27 @@
 #ifdef __cplusplus
 extern "C"
 #endif
-char fftw_alloc_real ();
+char fftw_malloc ();
 int
 main ()
 {
-return fftw_alloc_real ();
+return fftw_malloc ();
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_fftw3_fftw_alloc_real=yes
+  ac_cv_lib_fftw3_fftw_malloc=yes
 else
-  ac_cv_lib_fftw3_fftw_alloc_real=no
+  ac_cv_lib_fftw3_fftw_malloc=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_alloc_real" >&5
-$as_echo "$ac_cv_lib_fftw3_fftw_alloc_real" >&6; }
-if test "x$ac_cv_lib_fftw3_fftw_alloc_real" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_malloc" >&5
+$as_echo "$ac_cv_lib_fftw3_fftw_malloc" >&6; }
+if test "x$ac_cv_lib_fftw3_fftw_malloc" = xyes; then :
   AST_FFTW3_FOUND=yes
 else
   AST_FFTW3_FOUND=no
diff --git a/configure.ac b/configure.ac
index 67f04e5..87f63db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2421,7 +2421,7 @@
 # ------------------------------------^
 
 AST_EXT_LIB_CHECK([RESAMPLE], [resample], [resample_open], [libresample.h], [-lm])
-AST_EXT_LIB_CHECK([FFTW3], [fftw3], [fftw_alloc_real], [fftw3.h])
+AST_EXT_LIB_CHECK([FFTW3], [fftw3], [fftw_malloc], [fftw3.h])
 AST_EXT_LIB_CHECK([SNDFILE], [sndfile], [sf_open], [sndfile.h])
 
 AST_C_COMPILE_CHECK([SPANDSP], [

-- 
To view, visit https://gerrit.asterisk.org/9290
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ice5640e08385a64a0a6555deaccd91e86bca154f
Gerrit-Change-Number: 9290
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180705/4491ee17/attachment.html>


More information about the asterisk-code-review mailing list