23 #if !defined(_MSC_VER) && !defined(__CYGWIN__) && !defined(__MINGW32__) // Mingw/Microsoft doesn't have this header 26 #if defined(__CYGWIN__) || defined(__MINGW32__) 29 #define MAXDOUBLE DBL_MAX 39 std::cerr <<
"AudioMask: excitation malloc: Out of Memory"<<std::endl;
40 if (!(
mask=
new double[fBankCount]))
41 std::cerr <<
"AudioMask: mask malloc: Out of Memory"<<std::endl;
42 if (!(
Lvmu=
new double[fBankCount*fBankCount]))
43 std::cerr <<
"AudioMask: Lvmu malloc: Out of Memory"<<std::endl;
57 #define F2CB(f) (13.3*atan(0.75*f/1000)) 70 for (
int j=0;j<sampleCount;j++)
114 for (
int j=0;j<i;j++)
115 mask[i]+=pow(10.0,
Lvmu[i+j*bankCount]/20.0);
117 mask[i]+=pow(10.0,
Lvmu[i+j*bankCount]/20.0);
134 int which=bankCount-i-1;
136 for (
int j=0;j<sampleCount;j++){
153 for (
int j=0;j<i;j++)
double ** spread
The Moore/Glasberg spreading due to the filters.
void excite(double **filterBankOutput, int sampleCount, int sampleFreq)
double max
The maximum value of the mask.
void exciteTerhardt(double **filterBankOutput, int sampleCount)
double * excitation
The excitation of the roex filters.
double * mask
The audio mask.
void exciteBeerends(double **filterBankOutput, int sampleCount)
AudioMask(int sampFreq, int fBankCount)
~AudioMask(void)
Deconstructor.
int bankCount
The number of sub-bankds in the filter bank.