shithub: aubio

Download patch

ref: e460e60fc86f388cb1673c6f7aaf7bab49d75f1c
parent: b616ffe334c22157412dd574a8414948be4bc861
author: Paul Brossier <[email protected]>
date: Sun Oct 25 17:45:12 EDT 2009

interfaces/cpp: remove, will create a separate project later if needed

--- a/Makefile.am
+++ b/Makefile.am
@@ -13,7 +13,7 @@
 endif
 
 
-SUBDIRS = src interfaces/cpp examples sounds plugins $(PYTHONDIR) $(SWIGDIR) $(JAVADIR) $(DOC) tests
+SUBDIRS = src examples sounds plugins $(PYTHONDIR) $(SWIGDIR) $(JAVADIR) $(DOC) tests
 EXTRA_DIST = bootstrap VERSION
 
 docs:
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,6 @@
 if test "$ac_cv_prog_cc" = "no" ; then
    AC_MSG_ERROR([*** No C compiler found !])
 fi
-AC_PROG_CXX
 AC_PROG_INSTALL
 
 AUBIO_CFLAGS=
@@ -260,7 +259,6 @@
     examples/Makefile
     tests/Makefile
     tests/src/Makefile
-    tests/cpp/Makefile
     sounds/Makefile
     swig/Makefile
     python/Makefile
@@ -267,7 +265,6 @@
     python/aubio/Makefile
     interfaces/java/Makefile
     interfaces/java/aubio/Makefile
-    interfaces/cpp/Makefile
     plugins/Makefile
     plugins/audacity/Makefile
     plugins/audacity/plug-ins/Makefile
--- a/interfaces/cpp/Makefile.am
+++ /dev/null
@@ -1,7 +1,0 @@
-pkginclude_HEADERS = aubiocpp.h
-
-lib_LTLIBRARIES = libaubiocpp.la 
-libaubiocpp_la_SOURCES = aubiocpp.cpp
-AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir)/src @AUBIO_CFLAGS@ @FFTWLIB_CFLAGS@ @SAMPLERATE_CFLAGS@
-libaubiocpp_la_LIBADD  = -laubio -L${top_builddir}/src @FFTWLIB_LIBS@ @SAMPLERATE_LIBS@ @LTLIBOBJS@
-libaubiocpp_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@
--- a/interfaces/cpp/aubiocpp.cpp
+++ /dev/null
@@ -1,28 +1,0 @@
-#include "aubio.h"
-#include "aubiocpp.h"
-
-namespace aubio {
-
-  fvec::fvec(uint_t length, uint_t channels) {
-    self = new_fvec(length, channels);
-  }
-
-  fvec::~fvec() {
-    del_fvec(self);
-  }
-
-  smpl_t* fvec::operator[]( uint_t channel ) {
-    return fvec_get_channel(self, channel);
-  }
-
-  cvec::cvec(uint_t length, uint_t channels) {
-    self = new_cvec(length, channels);
-    norm = cvec_get_norm(self);
-    phas = cvec_get_phas(self);
-  }
-
-  cvec::~cvec() {
-    del_cvec(self);
-  }
-
-}
--- a/interfaces/cpp/aubiocpp.h
+++ /dev/null
@@ -1,31 +1,0 @@
-#include "aubio.h"
-
-namespace aubio {
-
-  class fvec {
-
-    private:
-      fvec_t * self;
-
-    public:
-      fvec(uint_t length, uint_t channels);
-      ~fvec();
-      smpl_t* operator[]( uint_t channel );
-
-  };
-
-  class cvec {
-
-    private:
-      cvec_t * self;
-
-    public:
-      smpl_t ** norm;
-      smpl_t ** phas;
-
-      cvec(uint_t length, uint_t channels);
-      ~cvec();
-
-  };
-
-}
--- a/interfaces/cpp/wscript_build
+++ /dev/null
@@ -1,11 +1,0 @@
-# build libaubiocpp
-libaubiocpp = bld.new_task_gen(
-    features = 'cxx cshlib',
-    includes = ['.', '../../src'],
-    source = bld.path.ant_glob('*.cpp'),
-    target = 'aubiocpp',
-    uselib_local = ['aubio'],
-    vnum = bld.env['LIB_VERSION'])
-
-# install header
-bld.install_files('${PREFIX}/include/aubio/', 'aubiocpp.h')
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,3 +1,3 @@
 if COMPILE_TESTS 
-SUBDIRS = src cpp
+SUBDIRS = src
 endif
--- a/tests/cpp/Makefile.am
+++ /dev/null
@@ -1,15 +1,0 @@
-AM_CXXFLAGS = -I$(top_srcdir)/cpp -I$(top_srcdir)/src
-AM_LDFLAGS = -L$(top_builddir)/cpp -laubiocpp -L$(top_builddir)/src -laubio @FFTWLIB_LIBS@
-
-bin_PROGRAMS = \
-	test-fvec \
-	test-cvec
-
-test_fvec_SOURCES = test-fvec.cpp
-test_cvec_SOURCES = test-cvec.cpp
-
-run-tests: $(bin_PROGRAMS)
-	@for i in $(bin_PROGRAMS); do echo $$i; ((time ./$$i 2>&1 > /dev/null) 2>&1; echo $$?); done
-
-run-valgrind-tests: $(bin_PROGRAMS)
-	@for i in $(bin_PROGRAMS); do echo $$i; valgrind .libs/lt-$$i 2>&1 | grep ERROR\ SUMMARY -A4; echo $$?; done
--- a/tests/cpp/test-cvec.cpp
+++ /dev/null
@@ -1,21 +1,0 @@
-#include <iostream>
-#include <aubiocpp.h>
-
-using namespace std;
-using namespace aubio;
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        cvec c = cvec(win_s, channels); /* input buffer */
-        cout << c.norm[0][0] << endl;
-        c.norm[0][0] = 2.;
-        cout << c.norm[0][0] << endl;
-        cout << c.phas[0][0] << endl;
-        c.phas[0][0] = 2.;
-        cout << c.phas[0][0] << endl;
-        return 0;
-}
-
-
--- a/tests/cpp/test-fvec.cpp
+++ /dev/null
@@ -1,17 +1,0 @@
-#include <iostream>
-#include <aubiocpp.h>
-
-using namespace std;
-using namespace aubio;
-
-int main(){
-        /* allocate some memory */
-        uint_t win_s      = 1024;                       /* window size */
-        uint_t channels   = 1;                          /* number of channel */
-        fvec f = fvec(win_s, channels); /* input buffer */
-        cout << f[0][0] << endl;
-        f[0][0] = 2.;
-        cout << f[0][0] << endl;
-        return 0;
-}
-
--- a/wscript
+++ b/wscript
@@ -136,7 +136,7 @@
   bld.env['LIB_VERSION'] = LIB_VERSION 
 
   # add sub directories
-  bld.add_subdirs('src examples interfaces/cpp')
+  bld.add_subdirs('src examples')
   if bld.env['SWIG']:
     if bld.env['PYTHON']:
       bld.add_subdirs('python/aubio python')