19 #ifndef AUDIOMASKER_H_ 20 #define AUDIOMASKER_H_ 29 #include <Eigen/Dense> 30 using namespace Eigen;
32 #define AUDIOMASKER_MULTICHANNEL_ERROR AUDIOMASKER_ERROR_OFFSET-1 33 #define AUDIOMASKER_SAMPLECOUNT_ERROR AUDIOMASKER_ERROR_OFFSET-2 43 errors[
AUDIOMASKER_MULTICHANNEL_ERROR]=std::string(
"AudioMasker: Can not handle more then one channel of audio. Please provide audio in a single column");
44 errors[
AUDIOMASKER_SAMPLECOUNT_ERROR]=std::string(
"AudioMasker: Please supply a sufficient number audio samples, try to provide at least 10*AudioMasker.getBankCount(). Please provide audio in a single column");
57 #define DEFAULT_FBCOUNT 100 58 #define DEFAULT_SAMPLECOUNT 512 59 #define DEFAULT_SAMPLEFREQ 44100 133 void excite(
short int *Input,
int sCount);
140 void excite(
double *Input,
int sCount);
147 template<
typename Derived>
148 int excite(
const Eigen::DenseBase<Derived> &Input) {
149 if (Input.cols()>Input.rows() || Input.cols()>1)
151 if (Input.rows() < 10*bankCount)
154 if (Input.rows() != sampleCount)
157 sampleCount=Input.rows();
162 for (
int i=0;i<sampleCount;i++)
173 double findThreshold(
double freq);
179 #endif //AUDIOMASKER_H_
RealFFTData * fftData
The FFT data.
#define AUDIOMASKER_MULTICHANNEL_ERROR
Error when the user passes in multichannel audio, currently not handled.
int bankCount
The filter bank count.
double * input
Filter bank input.
virtual ~AudioMaskerDebug()
Destructor.
double ** FBMalloc(int fCount, int sCount)
#define NO_ERROR
There is no error.
int excite(const Eigen::DenseBase< Derived > &Input)
void FBDeMalloc(double **outputGT, int fCount)
int sampleCount
The sample count.
class RealFFTData controls and manipulates fft data
double ** powOutput
Filter bank output power.
double ** output
Filter bank output.
#define AUDIOMASKER_SAMPLECOUNT_ERROR
Error when the user passes in audio with too few samples, currently not handled.
DepUKFB * pfb
roex filters
class RealFFT controls fftw plans and executes fwd/inv transforms