examples/Makefile
tests/Makefile
tests/src/Makefile
+ tests/cpp/Makefile
sounds/Makefile
swig/Makefile
python/Makefile
if COMPILE_TESTS
-SUBDIRS = src
+SUBDIRS = src cpp
endif
--- /dev/null
+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
--- /dev/null
+#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;
+}
+
+
--- /dev/null
+#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;
+}
+