shithub: aubio

Download patch

ref: 45521d2a2d96b210bd7ccd6e855c8093bcfde60e
parent: 8be88e77f5c275fdf4efc99ae182d14940948786
author: Paul Brossier <piem@piem.org>
date: Mon Oct 3 12:33:02 EDT 2016

python/lib/moresetuptools.py: use samplerate in single precision only

--- a/python/lib/moresetuptools.py
+++ b/python/lib/moresetuptools.py
@@ -52,7 +52,7 @@
     ext.library_dirs += [os.path.join('build', 'src')]
     ext.libraries += ['aubio']
 
-def add_local_aubio_sources(ext):
+def add_local_aubio_sources(ext, usedouble = False):
     """ build aubio inside python module instead of linking against libaubio """
     print("Warning: libaubio was not built with waf, adding src/")
     # create an empty header, macros will be passed on the command line
@@ -73,9 +73,15 @@
     print("Info: looking for *optional* additional packages")
     packages = ['libavcodec', 'libavformat', 'libavutil', 'libavresample',
                 'jack',
-                'sndfile', 'samplerate',
+                'jack',
+                'sndfile',
                 #'fftw3f',
                ]
+    # samplerate only works with float
+    if usedouble == False:
+        packages += ['samplerate']
+    else:
+        print("Info: not adding libsamplerate in double precision mode")
     add_packages(packages, ext=ext)
     if 'avcodec' in ext.libraries \
             and 'avformat' in ext.libraries \