[5069da3] | 1 | .. _requirements: |
---|
| 2 | |
---|
| 3 | Requirements |
---|
| 4 | ============ |
---|
| 5 | |
---|
[a9a1e79] | 6 | While aubio can be built without any external dependencies, we **recommend** to |
---|
| 7 | use at least some of the following libraries. |
---|
[5069da3] | 8 | |
---|
| 9 | Platform notes |
---|
| 10 | -------------- |
---|
| 11 | |
---|
[a9a1e79] | 12 | On all platforms, you will need to have installed: |
---|
| 13 | |
---|
| 14 | - a compiler (gcc, clang, msvc, ...) |
---|
| 15 | - python (any version >= 2.7, including 3.x) |
---|
| 16 | - a terminal to run command lines in |
---|
| 17 | |
---|
[5069da3] | 18 | Linux |
---|
| 19 | ..... |
---|
| 20 | |
---|
| 21 | The following `External libraries`_ will be used if found: `libav`_, |
---|
| 22 | `libsamplerate`_, `libsndfile`_, `libfftw3`_. |
---|
| 23 | |
---|
| 24 | macOS |
---|
| 25 | ..... |
---|
| 26 | |
---|
| 27 | The following system frameworks will be used on Mac OS X systems: |
---|
| 28 | |
---|
| 29 | - `Accelerate <https://developer.apple.com/reference/accelerate>`_ to compute |
---|
| 30 | FFTs and other vectorized operations optimally. |
---|
| 31 | |
---|
| 32 | - `CoreAudio <https://developer.apple.com/reference/coreaudio>`_ and |
---|
| 33 | `AudioToolbox <https://developer.apple.com/reference/audiotoolbox>`_ to |
---|
| 34 | decode audio from files and network streams. |
---|
| 35 | |
---|
| 36 | .. note:: |
---|
| 37 | |
---|
| 38 | To build a fat binary for both ``i386`` and ``x86_64``, use ``./waf configure |
---|
| 39 | --enable-fat``. |
---|
| 40 | |
---|
| 41 | The following `External libraries`_ will also be checked: `libav`_, |
---|
| 42 | `libsamplerate`_, `libsndfile`_, `libfftw3`_. |
---|
| 43 | |
---|
| 44 | Windows |
---|
| 45 | ....... |
---|
| 46 | |
---|
[7b3668c] | 47 | To use a specific version of the compiler, ``--msvc_version``. To build for a |
---|
| 48 | specific architecture, use ``--msvc_target``. For instance, to build aubio |
---|
| 49 | for ``x86`` using ``msvc 12.0``, use: |
---|
| 50 | |
---|
| 51 | .. code:: bash |
---|
| 52 | |
---|
| 53 | waf configure --msvc_version='msvc 12.0' --msvc_target='x86' |
---|
| 54 | |
---|
| 55 | |
---|
[5069da3] | 56 | The following `External libraries`_ will be used if found: `libav`_, |
---|
| 57 | `libsamplerate`_, `libsndfile`_, `libfftw3`_. |
---|
| 58 | |
---|
| 59 | iOS |
---|
| 60 | ... |
---|
| 61 | |
---|
| 62 | The following system frameworks will be used on iOS and iOS Simulator. |
---|
| 63 | |
---|
| 64 | - `Accelerate <https://developer.apple.com/reference/accelerate>`_ to compute |
---|
| 65 | FFTs and other vectorized operations optimally. |
---|
| 66 | |
---|
| 67 | - `CoreAudio <https://developer.apple.com/reference/coreaudio>`_ and |
---|
| 68 | `AudioToolbox <https://developer.apple.com/reference/audiotoolbox>`_ to |
---|
| 69 | decode audio from files and network streams. |
---|
| 70 | |
---|
| 71 | To build aubio for iOS, configure with ``--with-target-platform=ios``. For the |
---|
| 72 | iOS Simulator, use ``--with-target-platform=iosimulator`` instead. |
---|
| 73 | |
---|
| 74 | By default, aubio is built with the following flags on iOS: |
---|
| 75 | |
---|
| 76 | .. code:: bash |
---|
| 77 | |
---|
| 78 | CFLAGS="-fembed-bitcode -arch arm64 -arch armv7 -arch armv7s -miphoneos-version-min=6.1" |
---|
| 79 | |
---|
| 80 | and on iOS Simulator: |
---|
| 81 | |
---|
| 82 | .. code:: |
---|
| 83 | |
---|
[6f29fe3] | 84 | CFLAGS="-arch i386 -arch x86_64 -mios-simulator-version-min=6.1" |
---|
[5069da3] | 85 | |
---|
| 86 | Set ``CFLAGS`` and ``LINKFLAGS`` to change these default values, or edit |
---|
| 87 | ``wscript`` directly. |
---|
| 88 | |
---|
| 89 | Build options |
---|
| 90 | ------------- |
---|
| 91 | |
---|
[a9a1e79] | 92 | Some additional options can be passed to the configure step. For the complete |
---|
| 93 | list of options, run: |
---|
| 94 | |
---|
[385a9c1e] | 95 | .. code:: bash |
---|
| 96 | |
---|
[a9a1e79] | 97 | $ ./waf configure --help |
---|
[5069da3] | 98 | |
---|
| 99 | Double precision |
---|
| 100 | ................ |
---|
| 101 | |
---|
| 102 | To compile aubio in double precision mode, configure with ``--enable-double``. |
---|
| 103 | |
---|
| 104 | To compile aubio in single precision mode, use ``--disable-double`` (default). |
---|
| 105 | |
---|
| 106 | Fat binary |
---|
| 107 | .......... |
---|
| 108 | |
---|
| 109 | To build a fat binary on Mac OS platforms, configure with ``--enable-fat``. |
---|
| 110 | |
---|
| 111 | External libraries |
---|
| 112 | ------------------ |
---|
| 113 | |
---|
| 114 | External libraries are checked for using ``pkg-config``. Set the |
---|
| 115 | ``PKG_CONFIG_PATH`` environment variable if you have them installed in an |
---|
| 116 | unusual location. |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | .. note:: |
---|
| 120 | |
---|
| 121 | If ``pkg-config`` is not found in ``PATH``, the configure step will |
---|
| 122 | succeed, but none of the external libraries will be used. |
---|
| 123 | |
---|
| 124 | libav |
---|
| 125 | ..... |
---|
| 126 | |
---|
| 127 | `libav.org <https://libav.org/>`_, open source audio and video processing |
---|
| 128 | tools. |
---|
| 129 | |
---|
| 130 | If all of the following libraries are found, they will be used to compile |
---|
| 131 | ``aubio_source_avcodec``. so that ``aubio_source`` will be able to decode audio |
---|
| 132 | from all formats supported by `libav |
---|
| 133 | <https://libav.org/documentation/general.html#Audio-Codecs>`_. |
---|
| 134 | |
---|
| 135 | * libavcodec |
---|
| 136 | * libavformat |
---|
| 137 | * libavutil |
---|
| 138 | * libavresample |
---|
| 139 | |
---|
| 140 | To enable this option, configure with ``--enable-avcodec``. The build will then |
---|
| 141 | failed if the required libraries are not found. To disable this option, |
---|
| 142 | configure with ``--disable-avcodec`` |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | libsndfile |
---|
| 146 | .......... |
---|
| 147 | |
---|
| 148 | `libsndfile <http://www.mega-nerd.com/libsndfile/>`_, a C library for reading |
---|
| 149 | and writing sampled sound files. |
---|
| 150 | |
---|
| 151 | With libsndfile built in, ``aubio_source_sndfile`` will be built in and used by |
---|
| 152 | ``aubio_source``. |
---|
| 153 | |
---|
| 154 | To enable this option, configure with ``--enable-sndfile``. The build will then |
---|
[a9a1e79] | 155 | fail if the required library is not found. To disable this option, configure |
---|
[5069da3] | 156 | with ``--disable-sndfile`` |
---|
| 157 | |
---|
| 158 | libsamplerate |
---|
| 159 | ............. |
---|
| 160 | |
---|
| 161 | `libsamplerate <http://www.mega-nerd.com/SRC/>`_, a sample rate converter for |
---|
| 162 | audio. |
---|
| 163 | |
---|
| 164 | With libsamplerate built in, ``aubio_source_sndfile`` will support resampling, |
---|
| 165 | and ``aubio_resample`` will be fully functional. |
---|
| 166 | |
---|
| 167 | To enable this option, configure with ``--enable-samplerate``. The build will |
---|
[a9a1e79] | 168 | then fail if the required library is not found. To disable this option, |
---|
[5069da3] | 169 | configure with ``--disable-samplerate`` |
---|
| 170 | |
---|
| 171 | libfftw3 |
---|
| 172 | ........ |
---|
| 173 | |
---|
| 174 | `FFTW <http://fftw.org/>`_, a C subroutine for computing the discrete Fourier |
---|
| 175 | transform |
---|
| 176 | |
---|
| 177 | With libfftw3 built in, ``aubio_fft`` will use `FFTW <http://fftw.org>`_ to |
---|
| 178 | compute Fast Fourier Transform (FFT), allowing aubio to compute FFT on length |
---|
| 179 | that are not a power of 2. |
---|
| 180 | |
---|
| 181 | To enable this option, configure with ``--enable-fftw3``. The build will |
---|
[a9a1e79] | 182 | then fail if the required library is not found. To disable this option, |
---|
[5069da3] | 183 | configure with ``--disable-fftw3`` |
---|
| 184 | |
---|
| 185 | External tools |
---|
| 186 | -------------- |
---|
| 187 | |
---|
| 188 | If the following tools are found, additional documentations are built: |
---|
| 189 | |
---|
| 190 | - `doxygen <http://doxygen.org>`_ to build the `API documentation`. |
---|
| 191 | - `txt2man <https://github.com/mvertes/txt2man>`_ to build the :ref:`manpages` |
---|
| 192 | |
---|
| 193 | These tools are searched for in the current ``PATH`` environment variable. |
---|
| 194 | By default, the documentation is built only if the tools are found. |
---|
| 195 | |
---|
| 196 | To disable the documentation, configure with ``--disable-docs``. To build with |
---|
| 197 | the documentation, configure with ``--enable-docs``. |
---|
| 198 | |
---|