1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
/****************************************************************************
DRC: Digital Room Correction
Copyright (C) 2002-2017 Denis Sbragion
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
You can contact the author on Internet at the following address:
d.sbragion@neomerica.it
This program uses the FFT routines from Takuya Ooura and the GNU
Scientific Library (GSL). Many thanks to Takuya Ooura and the GSL
developers for these efficient routines.
****************************************************************************/
/* Header generale DRC */
#ifndef DRC_h
#define DRC_h
#include "cfgparse.h"
#include <float.h>
/* Decommentare per abilitare la compilazione in doppia precisione */
/* Uncomment to enable double precision computation */
#define UseDouble
/* Commentare per disabilitare l'uso delle routine FFT incluse nella GSL */
/* Comment out to disable GSL FFT routines */
#define UseGSLFft
/* Decommentare per abilitare l'uso delle routine FFT di Ooura per potenze di 2 */
/* Le routine FFT di Ooura sono leggermente meno accurate delle routine GSL ma sono anche
pi veloci */
/* Uncomment to enable the use of the Ooura FFT routines for power of 2 lenghts */
/* The Ooura FFT routines are a little less accurate then the GSL FFT routines but are also
noticeably faster */
/* #define UseOouraFft */
#ifdef UseDouble
/* Tipo floating point usato per le elaborazioni */
#define DRCFloat double
/* Tipo corrispondente per l'importazione di valori di
configurazione */
#define DRCCfgFloat CfgDouble
/* Valore minimo e massimo del tipo float in uso */
#ifdef DBL_MIN
#define DRCMinFloat DBL_MIN
#else
#define DRCMinFloat 2.2250738585072014e-308
#endif
#ifdef DBL_MAX
#define DRCMaxFloat DBL_MAX
#else
#define DRCMaxFloat 1.7976931348623158e+308
#endif
#ifdef DBL_EPSILON
#define DRCEpsFloat DBL_EPSILON
#else
#define DRCEpsFloat 2.2204460492503131e-016
#endif
#else
/* Tipo floating point usato per le elaborazioni */
#define DRCFloat float
/* Tipo corrispondente per l'importazione di valori di
configurazione */
#define DRCCfgFloat CfgFloat
/* Valore minimo e massimo del tipo float in uso */
#ifdef FLT_MIN
#define DRCMinFloat FLT_MIN
#else
#define DRCMinFloat 1.175494351e-38F
#endif
#ifdef FLT_MAX
#define DRCMaxFloat FLT_MAX
#else
#define DRCMaxFloat 3.402823466e+38F
#endif
#ifdef FLT_EPSILON
#define DRCEpsFloat FLT_EPSILON
#else
#define DRCEpsFloat 1.192092896e-07F
#endif
#endif
/* Tipo floating point usato per l'importazione e
l'esportazione dei segnali floating point in doppia precisione */
#define DRCFileDouble double
/* Tipo floating point usato per l'importazione e
l'esportazione dei segnali floating point in singola precisione */
#define DRCFileFloat float
/* Tipo intero usato per l'importazione e
l'esportazione dei segnali interi */
#define DRCFileInt short int
/* Imposta l'uso delle funzioni trigonometriche ridotte */
#define UseTypedTrigs
/* Verifica l'uso delle funzioni trigonometriche ridotte */
#ifdef UseTypedTrigs
#ifdef UseDouble
#define DRCSin sin
#define DRCCos cos
#define DRCTan tan
#define DRCATan atan
#else
#define DRCSin sinf
#define DRCCos cosf
#define DRCTan tanf
#define DRCATan atanf
#endif
#else
#define DRCSin sin
#define DRCCos cos
#define DRCTan tan
#define DRCATan atan
#endif
#endif
|