diff options
author | Jamie Bullock <jamie@jamiebullock.com> | 2014-11-08 00:07:02 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@jamiebullock.com> | 2014-11-08 00:07:02 +0000 |
commit | ba706261d3fc5b436aa6f09d57e62eeb77377d8f (patch) | |
tree | 4faadd5931a89a847ae9bb2345d9fe7bb0e2f778 /swig/python | |
parent | 89890e226e5da72743f885cefb5273c51baf094e (diff) | |
parent | 89a9ec7a352dc35141b8f9a87c202fdd448e9a6f (diff) | |
download | LibXtract-ba706261d3fc5b436aa6f09d57e62eeb77377d8f.tar.gz LibXtract-ba706261d3fc5b436aa6f09d57e62eeb77377d8f.tar.bz2 LibXtract-ba706261d3fc5b436aa6f09d57e62eeb77377d8f.zip |
Merge branch 'feature/no-autotools' into develop
Diffstat (limited to 'swig/python')
-rw-r--r-- | swig/python/.gitignore | 2 | ||||
-rw-r--r-- | swig/python/Makefile.am | 18 | ||||
-rw-r--r-- | swig/python/__init__.py | 0 | ||||
-rw-r--r-- | swig/python/test.py | 57 |
4 files changed, 0 insertions, 77 deletions
diff --git a/swig/python/.gitignore b/swig/python/.gitignore deleted file mode 100644 index 6dfa0ae..0000000 --- a/swig/python/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -xtract.py -xtract_wrap.c
\ No newline at end of file diff --git a/swig/python/Makefile.am b/swig/python/Makefile.am deleted file mode 100644 index 833c2f3..0000000 --- a/swig/python/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -MAINTAINERCLEANFILES = xtract.py xtract_wrap.c Makefile.in _xtract.so - -BUILT_SOURCES = xtract_wrap.c -SWIG_SOURCES = ../xtract.i - -pkgpython_PYTHON = xtract.py __init__.py -pkgpyexec_LTLIBRARIES = _xtract.la -_xtract_la_SOURCES = $(BUILT_SOURCES) $(SWIG_SOURCES) -_xtract_la_CFLAGS = $(AX_SWIG_PYTHON_CPPFLAGS) -I$(top_srcdir)/src -_xtract_la_LDFLAGS = -module -_xtract_la_LIBADD = $(top_srcdir)/src/libxtract.la - -$(srcdir)/xtract_wrap.c : $(SWIG_SOURCES) - $(SWIG) $(AX_SWIG_PYTHON_OPT) -I$(top_srcdir) -o $@ $< - -clean-local: - -rm -f _xtract.so xtract.py xtract_wrap.c xtract.pyc - diff --git a/swig/python/__init__.py b/swig/python/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/swig/python/__init__.py +++ /dev/null diff --git a/swig/python/test.py b/swig/python/test.py deleted file mode 100644 index a89a6f9..0000000 --- a/swig/python/test.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/python - -try: - import libxtract.xtract as xtract -except ImportError: - print 'Failed to load the library "xtract"' - -print '\nRunning libxtract Python bindings test...\n' - -len = 8 - -a = xtract.doubleArray(len) -temp = [] - -for i in range(0, len): - a[i] = 2 * i - temp.append(str(a[i])) - -mean = xtract.xtract_mean(a,len,None)[1] - -print 'The mean of ' + ', '.join(temp) + ' is: %.2f' % mean - -argv = xtract.doubleArray(1) -argv[0] = mean - -variance = xtract.xtract_variance(a, len, argv)[1] - -print 'The variance is %.2f' % variance - -print 'Computing spectrum...' - -argv = xtract.doubleArray(1) -argv[0] = 44100.0 / len # Fake sample rate - -xtract.xtract_init_fft(len, xtract.XTRACT_SPECTRUM); - -result = xtract.doubleArray(len) - -xtract.xtract_spectrum(a,len,argv, result) - - -for i in range(len): - print result[i] - - -print 'Computing windowed subframes...' - -for i in range(0, len): - a[i] = 1.0 - -window = xtract.xtract_init_window(len / 2, xtract.XTRACT_HANN) -xtract.xtract_features_from_subframes(a, len, xtract.XTRACT_WINDOWED, window, result) - -for i in range(len): - print result[i] - -print '\nFinished!\n' |