changeset 99:8ba3e526c038

Committed missing files needed for new out-of-place fftw plan creation
author Jamie Bullock <jamie@postlude.co.uk>
date Mon, 08 Oct 2007 10:32:16 +0000
parents ca40a0dc29d6
children 068c8c526e51
files examples/puredata/xtract/a_blockswap~.pd src/fini.c src/xtract_globals_private.h
diffstat 3 files changed, 113 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/puredata/xtract/a_blockswap~.pd	Mon Oct 08 10:32:16 2007 +0000
@@ -0,0 +1,29 @@
+#N canvas 670 208 475 328 10;
+#X obj 70 159 samplerate~;
+#X obj 70 223 phasor~;
+#X msg 163 159 0.5;
+#X obj 23 10 inlet~;
+#X obj 23 34 tabsend~ input;
+#X obj 385 4 table input;
+#X obj 76 272 tabread~ input;
+#X obj 75 299 outlet~;
+#X obj 70 194 / \$1;
+#X obj 141 78 loadbang;
+#X text 232 72 Clone of zexy blockswap~;
+#X text 232 90 First argument gives block size;
+#X msg 209 158 \; input resize \$1;
+#X obj 141 109 t b b b;
+#X obj 75 249 *~ \$1;
+#X obj 209 135 f \$1;
+#X connect 0 0 8 0;
+#X connect 1 0 14 0;
+#X connect 2 0 1 1;
+#X connect 3 0 4 0;
+#X connect 6 0 7 0;
+#X connect 8 0 1 0;
+#X connect 9 0 13 0;
+#X connect 13 0 0 0;
+#X connect 13 1 2 0;
+#X connect 13 2 15 0;
+#X connect 14 0 6 0;
+#X connect 15 0 12 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/fini.c	Mon Oct 08 10:32:16 2007 +0000
@@ -0,0 +1,48 @@
+/* libxtract feature extraction library
+ *
+ * Copyright (C) 2006 Jamie Bullock
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
+ * USA.
+ */
+
+/* fini.c: Contains library destructor routine */
+
+#ifdef XTRACT_FFT
+#include <fftw3.h>
+#include "xtract_globals_private.h"
+#endif
+
+#ifdef __GNUC__
+__attribute__((destructor)) void fini()
+#else
+void _fini()
+#endif
+{
+#ifdef XTRACT_FFT
+    if(spectrum_plan != NULL)
+        fftwf_destroy_plan(spectrum_plan);
+    if(autocorrelation_fft_plan_1 != NULL)
+        fftwf_destroy_plan(autocorrelation_fft_plan_1);
+    if(autocorrelation_fft_plan_2 != NULL)
+        fftwf_destroy_plan(autocorrelation_fft_plan_2);
+    if(dct_plan != NULL)
+        fftwf_destroy_plan(dct_plan);
+    fftwf_cleanup();
+#endif
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/xtract_globals_private.h	Mon Oct 08 10:32:16 2007 +0000
@@ -0,0 +1,36 @@
+/* libxtract feature extraction library
+ *
+ * Copyright (C) 2006 Jamie Bullock
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
+ * USA.
+ */
+
+/* xtract_globals_private.h: declares private global variables */
+
+#ifndef XTRACT_GLOBALS_PRIVATE_H
+#define XTRACT_GLOBALS_PRIVATE_H
+
+#ifdef XTRACT_FFT
+#include <fftw3.h>
+
+fftwf_plan spectrum_plan,
+          autocorrelation_fft_plan_1,
+          autocorrelation_fft_plan_2,
+          dct_plan;
+#endif
+
+#endif
+