Changeset 8a1f9a4 for src/mathutils.h


Ignore:
Timestamp:
Sep 29, 2006, 3:58:29 PM (18 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
17db1cd
Parents:
9ec7876
Message:

move libc aliases from mathutils.h to to aubio_priv.h
move libc aliases from mathutils.h to to aubio_priv.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.h

    r9ec7876 r8a1f9a4  
    2929#ifndef MATHUTILS_H
    3030#define MATHUTILS_H
    31 
    32 #define PI                              (M_PI)
    33 #define TWO_PI          (PI*2.)
    34 
    35 /* aliases to math.h functions */
    36 #define EXP                             expf
    37 #define COS                             cosf
    38 #define SIN                             sinf
    39 #define ABS                             fabsf
    40 #define POW                             powf
    41 #define SQRT                    sqrtf
    42 #define LOG10                   log10f
    43 #define LOG                       logf
    44 #define FLOOR                   floorf
    45 #define TRUNC                   truncf
    46 
    47 /* aliases to complex.h functions */
    48 #if defined(WIN32)
    49 /* mingw32 does not know about c*f functions */
    50 #define EXPC                    cexp
    51 /** complex = CEXPC(complex) */
    52 #define CEXPC                   cexp
    53 /** sample = ARGC(complex) */
    54 #define ARGC                    carg
    55 /** sample = ABSC(complex) norm */
    56 #define ABSC                    cabs
    57 /** sample = REAL(complex) */
    58 #define REAL                    creal
    59 /** sample = IMAG(complex) */
    60 #define IMAG                    cimag
    61 #else
    62 /** sample = EXPC(complex) */
    63 #define EXPC                    cexpf
    64 /** complex = CEXPC(complex) */
    65 #define CEXPC                   cexp
    66 /** sample = ARGC(complex) */
    67 #define ARGC                    cargf
    68 /** sample = ABSC(complex) norm */
    69 #define ABSC                    cabsf
    70 /** sample = REAL(complex) */
    71 #define REAL                    crealf
    72 /** sample = IMAG(complex) */
    73 #define IMAG                    cimagf
    74 #endif
    75 
    76 /* handy shortcuts */
    77 #define DB2LIN(g) (POW(10.0f,(g)*0.05f))
    78 #define LIN2DB(v) (20.0f*LOG10(v))
    79 #define SQR(_a)         (_a*_a)
    80 
    81 #define ELEM_SWAP(a,b) { register smpl_t t=(a);(a)=(b);(b)=t; }
    8231
    8332/** Window types
Note: See TracChangeset for help on using the changeset viewer.