From: Paul Brossier Date: Wed, 30 Sep 2009 01:54:34 +0000 (+0200) Subject: moved cpp to interfaces/ X-Git-Tag: 0.4.0-beta1~773 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=7de4de015830d47694c5375bd96147f0b530af9b;p=aubio.git moved cpp to interfaces/ --- diff --git a/configure.ac b/configure.ac index 77cda705..c4052b60 100644 --- a/configure.ac +++ b/configure.ac @@ -241,7 +241,6 @@ AC_OUTPUT([ Makefile src/Makefile ext/Makefile - cpp/Makefile examples/Makefile tests/Makefile tests/src/Makefile @@ -252,6 +251,7 @@ AC_OUTPUT([ python/aubio/Makefile interfaces/java/Makefile interfaces/java/aubio/Makefile + interfaces/cpp/Makefile plugins/Makefile plugins/audacity/Makefile plugins/audacity/plug-ins/Makefile diff --git a/cpp/Makefile.am b/cpp/Makefile.am deleted file mode 100644 index 1cf7e751..00000000 --- a/cpp/Makefile.am +++ /dev/null @@ -1,7 +0,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@ diff --git a/cpp/aubiocpp.cpp b/cpp/aubiocpp.cpp deleted file mode 100644 index 8f70611a..00000000 --- a/cpp/aubiocpp.cpp +++ /dev/null @@ -1,28 +0,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); - } - -} diff --git a/cpp/aubiocpp.h b/cpp/aubiocpp.h deleted file mode 100644 index d2c08484..00000000 --- a/cpp/aubiocpp.h +++ /dev/null @@ -1,31 +0,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(); - - }; - -} diff --git a/cpp/wscript_build b/cpp/wscript_build deleted file mode 100644 index 6d7a4661..00000000 --- a/cpp/wscript_build +++ /dev/null @@ -1,11 +0,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') diff --git a/interfaces/cpp/Makefile.am b/interfaces/cpp/Makefile.am new file mode 100644 index 00000000..1cf7e751 --- /dev/null +++ b/interfaces/cpp/Makefile.am @@ -0,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@ diff --git a/interfaces/cpp/aubiocpp.cpp b/interfaces/cpp/aubiocpp.cpp new file mode 100644 index 00000000..8f70611a --- /dev/null +++ b/interfaces/cpp/aubiocpp.cpp @@ -0,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); + } + +} diff --git a/interfaces/cpp/aubiocpp.h b/interfaces/cpp/aubiocpp.h new file mode 100644 index 00000000..d2c08484 --- /dev/null +++ b/interfaces/cpp/aubiocpp.h @@ -0,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(); + + }; + +} diff --git a/interfaces/cpp/wscript_build b/interfaces/cpp/wscript_build new file mode 100644 index 00000000..48fcc6ff --- /dev/null +++ b/interfaces/cpp/wscript_build @@ -0,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') diff --git a/wscript b/wscript index 9c680be9..d8fe5a40 100644 --- a/wscript +++ b/wscript @@ -135,7 +135,7 @@ def build(bld): 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')