13 #ifndef _MpDTMFDetector_h_ 14 #define _MpDTMFDetector_h_ 18 #include <os/OsIntTypes.h> 20 #include <utl/UtlDefs.h> 64 MpDtmfDetector(
const unsigned samplesPerSec,
const unsigned nProcessSamples);
197 #endif // _MpDTMFDetector_h_ char mLastDetectedDTMF
Definition: MpDTMFDetector.h:192
unsigned getNumProcessSamples() const
Get the number of samples that this detector uses to determine frequencies on.
Definition: MpDTMFDetector.cpp:121
double * mQ2
Definition: MpDTMFDetector.h:187
double * mR
Definition: MpDTMFDetector.h:188
MpDtmfDetector(const unsigned samplesPerSec, const unsigned nProcessSamples)
Default constructor.
Definition: MpDTMFDetector.cpp:35
char getLastDetectedDTMF() const
Get the last DTMF tone that the detector detected.
Definition: MpDTMFDetector.cpp:126
void calcCoeffs()
Calculate coefficients needed for the goertzel algorithm.
Definition: MpDTMFDetector.cpp:137
double * mCoefs
Definition: MpDTMFDetector.h:190
UtlBoolean processSample(const MpAudioSample sample)
Process a sample through the detector.
Definition: MpDTMFDetector.cpp:85
unsigned getSamplesPerSec() const
Get the sample rate.
Definition: MpDTMFDetector.cpp:116
static uint8_t snFreqsToDetect
Definition: MpDTMFDetector.h:184
int16_t MpAudioSample
Definition: MpTypes.h:44
void dtmfValidation()
Validate the detected frequencies detected by processSample.
Definition: MpDTMFDetector.cpp:147
unsigned mSamplesPerSec
Definition: MpDTMFDetector.h:179
A simple DTMF detector class that uses the Goertzel algorithm.
Definition: MpDTMFDetector.h:55
static double sFreqs_to_detect[]
Definition: MpDTMFDetector.h:183
void reset()
Reset the state of the detector.
Definition: MpDTMFDetector.cpp:57
unsigned mNumProcessSamples
Definition: MpDTMFDetector.h:180
void setNumProcessSamples(const unsigned nProcessSamples)
Set the number of samples to use to detect frequencies on.
Definition: MpDTMFDetector.cpp:80
virtual ~MpDtmfDetector()
Destructor.
Definition: MpDTMFDetector.cpp:47
void setSamplesPerSec(const unsigned samplesPerSec)
Set the sample rate.
Definition: MpDTMFDetector.cpp:74
double * mQ1
Definition: MpDTMFDetector.h:186
uint32_t mSampleCount
Definition: MpDTMFDetector.h:181