SAF
|
Main header for the utilities module (SAF_UTILITIES_MODULE) More...
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <float.h>
#include <assert.h>
#include <limits.h>
#include "../../resources/md_malloc/md_malloc.h"
#include "../../resources/kissFFT/kiss_fftr.h"
#include "../../resources/kissFFT/kiss_fft.h"
#include "../../resources/convhull_3d/convhull_3d.h"
#include "../../resources/speex_resampler/speex_resampler.h"
#include "../../resources/zlib/zlib.h"
#include "saf_utility_complex.h"
#include "saf_utility_sort.h"
#include "saf_utility_filters.h"
#include "saf_utility_veclib.h"
#include "saf_utility_bessel.h"
#include "saf_utility_fft.h"
#include "saf_utility_matrixConv.h"
#include "saf_utility_pitch.h"
#include "saf_utility_decor.h"
#include "saf_utility_misc.h"
#include "saf_utility_geometry.h"
#include "saf_utility_qmf.h"
#include "saf_utility_loudspeaker_presets.h"
#include "saf_utility_sensorarray_presets.h"
#include "../../resources/afSTFT/afSTFTlib.h"
#include "saf_utility_dvf.h"
Go to the source code of this file.
Macros | |
#define | NUM_EARS 2 |
2 (true for most humans) | |
#define | SAF_MIN(a, b) (( (a) < (b) ) ? (a) : (b)) |
Returns the minimum of the two values. | |
#define | SAF_MAX(a, b) (( (a) > (b) ) ? (a) : (b)) |
Returns the maximum of the two values. | |
#define | SAF_CLAMP(a, min, max) (SAF_MAX(min, SAF_MIN(max, a))) |
Ensures value "a" is clamped between the "min" and "max" values. | |
#define | SAF_TRUE ( 1 ) |
Boolean true. | |
#define | SAF_FALSE ( 0 ) |
Boolean false. | |
#define | SAF_PI ( 3.14159265358979323846264338327950288f ) |
pi constant (single precision) | |
#define | SAF_PId ( 3.14159265358979323846264338327950288 ) |
pi constant (double precision) | |
#define | SAF_ISPOW2(x) (((x & ~(x-1))==x) ? x : 0) |
Returns 0 if "x" is not a power of 2. | |
#define | ISEVEN(n) ((n%2 == 0) ? 1 : 0) |
Returns 1 if "n" is even valued, and 0 if it is not. | |
#define | ISODD(n) ((n%2 != 0) ? 1 : 0) |
Returns 1 if "n" is odd valued, and 0 if it is not. | |
#define | SQRT4PI ( 3.544907701811032f ) |
sqrt(4pi) (single precision) | |
#define | FOURPI ( 12.566370614359172f ) |
4pi (single precision) | |
#define | ELEV2INCL(E) ( (SAF_PI/2.0f - E) ) |
Converts elevation to inclincation, (in radians) | |
#define | DEG2RAD(x) (x * SAF_PI / 180.0f) |
Converts degrees to radians. | |
#define | RAD2DEG(x) (x * 180.0f / SAF_PI) |
Converts radians to degrees | |
#define | MKSTRING_(s) #s |
Used to make strings inside of Macros. | |
#define | MKSTRING(s) MKSTRING_(s) |
Used to make strings inside of Macros. | |
#define | SAF_UNUSED(x) (void)(x) |
Indicates that a particular variable is unused (& squelches any warnings) | |
#define | saf_print_warning(message) |
Macro to print a warning message along with the filename and line number. | |
#define | saf_print_error(message) |
Macro to print a error message along with the filename and line number. | |
#define | saf_assert(x, message) |
Macro to make an assertion, along with a string explaining its purpose. | |
Main header for the utilities module (SAF_UTILITIES_MODULE)
A collection of useful utility functions; including: cross-platform complex number wrappers; optimised linear algebra routines based on CBLAS and LAPACK; FFT wrappers and STFT implementation; IIR/FIR filter coefficients and filter bank designs; lists of common loudspeaker and microphone array coordinates; multi-channel and matrix convolvers; spherical Bessel/Hankel functions (including their derivatives); etc.
Definition in file saf_utilities.h.