shithub: aubio

Download patch

ref: 7de4de015830d47694c5375bd96147f0b530af9b
parent: 0a6c2115562490aff6ef173bff92e28e48444e85
author: Paul Brossier <piem@piem.org>
date: Tue Sep 29 23:54:34 EDT 2009

moved cpp to interfaces/

--- a/configure.ac
+++ b/configure.ac
@@ -241,7 +241,6 @@
     Makefile
     src/Makefile
     ext/Makefile
-    cpp/Makefile
     examples/Makefile
     tests/Makefile
     tests/src/Makefile
@@ -252,6 +251,7 @@
     python/aubio/Makefile
     interfaces/java/Makefile
     interfaces/java/aubio/Makefile
+    interfaces/cpp/Makefile
     plugins/Makefile
     plugins/audacity/Makefile
     plugins/audacity/plug-ins/Makefile
--- a/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/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 self->data[channel];
-  }
-
-  cvec::cvec(uint_t length, uint_t channels) {
-    self = new_cvec(length, channels);
-    norm = self->norm;
-    phas = self->phas;
-  }
-
-  cvec::~cvec() {
-    del_cvec(self);
-  }
-
-}
--- a/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/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')
--- /dev/null
+++ b/interfaces/cpp/Makefile.am
@@ -1,0 +1,7 @@
+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@
--- /dev/null
+++ b/interfaces/cpp/aubiocpp.cpp
@@ -1,0 +1,28 @@
+#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 self->data[channel];
+  }
+
+  cvec::cvec(uint_t length, uint_t channels) {
+    self = new_cvec(length, channels);
+    norm = self->norm;
+    phas = self->phas;
+  }
+
+  cvec::~cvec() {
+    del_cvec(self);
+  }
+
+}
--- /dev/null
+++ b/interfaces/cpp/aubiocpp.h
@@ -1,0 +1,31 @@
+#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();
+
+  };
+
+}
--- /dev/null
+++ b/interfaces/cpp/wscript_build
@@ -1,0 +1,11 @@
+# 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/wscript
+++ b/wscript
@@ -135,7 +135,7 @@
   bld.env['LIB_VERSION'] = LIB_VERSION 
 
   # add sub directories
-  bld.add_subdirs('src ext examples cpp')
+  bld.add_subdirs('src ext examples interfaces/cpp')
   if bld.env['SWIG']:
     if bld.env['PYTHON']:
       bld.add_subdirs('python/aubio python')