7 #ifndef _MprToneDetect_h_ 8 #define _MprToneDetect_h_ 155 #endif // _MprToneDetect_h_ Message object used to communicate with the media processing task.
Definition: MpFlowGraphMsg.h:33
Message object used to communicate with the media processing task.
Definition: MpResourceMsg.h:30
unsigned mBlockSize
Definition: MprToneDetect.h:140
static OsStatus changeTargetFrequency(const UtlString &namedResource, OsMsgQ &fgQ, int targetFreq)
Definition: MprToneDetect.cpp:280
Definition: MpResourceMsg.h:56
static const double DEFAULT_TARGET_FREQ
Definition: MprToneDetect.h:124
bool mToneSignaled
Definition: MprToneDetect.h:137
MpFlowGraphBase * mpFlowGraph
Definition: MprToneDetect.h:142
double mTargetFreq
Definition: MprToneDetect.h:134
Definition: MprToneDetect.h:84
Flow graph for coordinating the execution of media processing resources.
Definition: MpFlowGraphBase.h:91
double getAvgMagnitude(const UtlString &resName)
Definition: MprToneDetect.cpp:306
double mCoeff
Definition: MprToneDetect.h:130
double mQ2
Definition: MprToneDetect.h:132
Definition: MprToneDetect.h:89
virtual ~MprToneDetect()
Destructor.
Definition: MprToneDetect.cpp:70
void initFilter()
Definition: MprToneDetect.cpp:260
int16_t MpAudioSample
Definition: MpTypes.h:44
Definition: MprToneDetect.h:83
virtual UtlBoolean doProcessFrame(MpBufPtr inBufs[], MpBufPtr outBufs[], int inBufsSize, int outBufsSize, UtlBoolean isEnabled, int samplesPerFrame, int samplesPerSecond)
This method does the real work for the media processing resource and must be defined in each class de...
Definition: MprToneDetect.cpp:84
Abstract base class for all audio processing objects.
Definition: MpAudioResource.h:38
double filterSample(MpAudioSample sample, uint32_t n)
Definition: MprToneDetect.cpp:275
virtual UtlBoolean handleMessage(MpFlowGraphMsg &fgMsg)
Handle flowgraph messages for this resource.
Definition: MprToneDetect.cpp:147
unsigned mBlockCnt
Definition: MprToneDetect.h:135
AddlMsgTypes
Definition: MprToneDetect.h:87
bool mCurTd
Definition: MprToneDetect.h:136
double mAvg3Mag
Definition: MprToneDetect.h:138
double mThreshold
Definition: MprToneDetect.h:133
MprToneDetect & operator=(const MprToneDetect &rhs)
Assignment operator (not implemented for this class)
double * mFilterData
Definition: MprToneDetect.h:144
The "Tone Detector" media processing resource.
Definition: MprToneDetect.h:30
void initGoertzel(void)
Definition: MprToneDetect.cpp:218
int mWindowSize
Definition: MprToneDetect.h:141
double getAvgMag() const
Definition: MprToneDetect.cpp:301
MprToneDetect(const UtlString &rName)
Constructor.
Definition: MprToneDetect.cpp:48
double mSampleRate
Definition: MprToneDetect.h:139
void processSample(MpAudioSample sample)
Definition: MprToneDetect.cpp:240
Smart pointer to MpBuf.
Definition: MpBuf.h:160
OsStatus setFlowGraph(MpFlowGraphBase *pFlowGraph)
Associates this resource with the indicated flow graph.
Definition: MprToneDetect.cpp:197
Definition: MprToneDetect.h:90
static OsStatus changeDetectionThreshold(const UtlString &namedResource, OsMsgQ &fgQ, int threshold)
Definition: MprToneDetect.cpp:291
static const double DEFAULT_THRESHOLD
Definition: MprToneDetect.h:126
double mQ1
Definition: MprToneDetect.h:131
static const int DEFAULT_WINDOW_SIZE
Definition: MprToneDetect.h:128
static const double DEFAULT_SAMPLING_RATE
Definition: MprToneDetect.h:125
void resetGoertzel(void)
Definition: MprToneDetect.cpp:209
static const unsigned DEFAULT_BLOCK_SIZE
Definition: MprToneDetect.h:127
double getMagnitudeSquared(void)
Definition: MprToneDetect.cpp:249
UtlBoolean isEnabled() const
Returns TRUE is this resource is currently enabled, FALSE otherwise.
Definition: MpResource.cpp:440
start of resource-specific messages
Definition: MpFlowGraphMsg.h:67