AudioMasker Class Reference

#include <AudioMasker.H>

Inheritance diagram for AudioMasker:
AudioMask MooreSpread

List of all members.

Public Member Functions

 AudioMasker (int sampFreq, int fBankCount)
 AudioMasker (void)
 Audio masker constructor - allowing specification of fs and sub-band count later.
 ~AudioMasker (void)
 Audio masker deconstructor.
void excite (short int *Input, int sCount)
void excite (double *Input, int sCount)
double findThreshold (double freq)

Public Attributes

DepUKFBpfb
 roex filters

Detailed Description

Audio masking class - top level Class to transform input audio in the time domain to a simultaneous audio mask in the frequency domain.

========================= HOWTO ===============================

// First find the masking threshold

AudioMasker masker(sampleFreq, count); // Create the audio masker class using fs=sampleFreq and count filters

masker.excite(input, sampleCount); // find the mask for the array of input data which has sampleCount time samples.

// Now do something with the masking threshold ...

// The frequency domain mask is now located here

for (int j=0; j<count;j++)

masker.mask[j]; // This is the mask at each of the count frequencies of interest

// A more sophisticated example - find the threshold for each Fourier bin

double fact=(double)sampleFreq/((double)sampleCount-1.0); // convert from an index to the equivalent Fourier bin frequency

for (int j=0; j<halfSampleCount;j++){

cout<<"finding for freq "<<j*fact<<''; // The frequency we are inspecting

double threshold=masker.findThreshold(j*fact); // The masking threshold

20*log10(threshold); // The threshold in decibels (dB)

}

Examples:

AudioMaskerExample.cc.


Constructor & Destructor Documentation

AudioMasker::AudioMasker ( int  sampFreq,
int  fBankCount 
)

The Audio masking constructor @ sampFreq The sample frequency of the time domain data @ fBankCount The number of filter banks


Member Function Documentation

void AudioMasker::excite ( double *  Input,
int  sCount 
)

Finds the excitation for input data @ Input Using double input data @ sCount samples

void AudioMasker::excite ( short int *  Input,
int  sCount 
)

Finds the excitation for input data @ Input Using short int input data @ sCount samples

These should be implemented differently for different Input types

Examples:
AudioMaskerExample.cc.
double AudioMasker::findThreshold ( double  freq  ) 

Returns the simultaneous masking threshold at a particular frequency @ freq The frequency of interest

Examples:
AudioMaskerExample.cc.

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables
Generated on Sat Jun 19 15:23:30 2010 for libaudiomask by  doxygen 1.6.3