13 #ifndef _MprSpeexEchoCancel_h_ 14 #define _MprSpeexEchoCancel_h_ 17 #include <speex/speex_echo.h> 29 # define SPEEX_DEFAULT_AEC_FILTER_LENGTH 240 31 # define SPEEX_DEFAULT_AEC_FILTER_LENGTH 200 54 static const UtlContainableType
TYPE;
60 #elif defined(ANDROID) 112 OsStatus
setSpkrQ(
const UtlString& namedResource,
229 #endif // _MprSpeexEchoCancel_h_
Message object used to communicate with the media processing task.
Definition: MpResourceMsg.h:30
All MprSpeexEchoCancel resources are forced to disable.
Definition: MprSpeexEchoCancel.h:71
AddlResMsgTypes
Definition: MprSpeexEchoCancel.h:165
virtual UtlBoolean handleMessage(MpResourceMsg &rMsg)
Handles an incoming flowgraph message for this media processing object.
Definition: MpResourceMsg.h:56
static volatile GlobalEnableState smGlobalEnableState
Definition: MprSpeexEchoCancel.h:179
#define SPEEX_DEFAULT_AEC_FILTER_LENGTH
Default filter length (tail length) of AEC filter (in milliseconds).
Definition: MprSpeexEchoCancel.h:31
Definition: MprSpeexEchoCancel.h:64
Flow graph for coordinating the execution of media processing resources.
Definition: MpFlowGraphBase.h:91
const int mSpkrQDelayMs
How much should we delay data from mpSpkrQ (in ms)?
Definition: MprSpeexEchoCancel.h:174
MprSpeexEchoCancel(const UtlString &rName, OsMsgQ *pSpkrQ=NULL, int spkrQDelayMs=DEFAULT_ECHO_QUEUE_LEN, int filterLength=SPEEX_DEFAULT_AEC_FILTER_LENGTH)
Constructor.
Each resource respect its own enable/disable state.
Definition: MprSpeexEchoCancel.h:72
static GlobalEnableState getGlobalEnableState()
Get global state.
Definition: MprSpeexEchoCancel.h:219
GlobalEnableState
Definition: MprSpeexEchoCancel.h:69
virtual ~MprSpeexEchoCancel()
Destructor.
Smart pointer to MpAudioBuf.
Definition: MpAudioBuf.h:168
Abstract base class for all audio processing objects.
Definition: MpAudioResource.h:38
bool mStartedCanceling
Have we started cancelling?
Definition: MprSpeexEchoCancel.h:171
OsStatus setFlowGraph(MpFlowGraphBase *pFlowGraph)
Associates this resource with the indicated flow graph.
MpAudioBufPtr mpSilenceBuf
Definition: MprSpeexEchoCancel.h:176
SpeexEchoState * getSpeexEchoState() const
Return Speex internal echo state structure.
Definition: MprSpeexEchoCancel.h:224
SpeexEchoState * mpEchoState
Speex internal AEC state.
Definition: MprSpeexEchoCancel.h:170
int mSpkrQDelayFrames
How much should we delay data from mpSpkrQ (in frames)?
Definition: MprSpeexEchoCancel.h:175
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: MprSpeexEchoCancel.h:167
int mFilterLength
Filter tail length. See constructor docs for details.
Definition: MprSpeexEchoCancel.h:172
Smart pointer to MpBuf.
Definition: MpBuf.h:160
Definition: MprSpeexEchoCancel.h:65
OsMsgQ * mpSpkrQ
Queue with echo reference data.
Definition: MprSpeexEchoCancel.h:173
OsStatus setSpkrQ(const UtlString &namedResource, OsMsgQ &fgQ, OsMsgQ *pSpkrQ)
Send message to enable/disable copy queue.
static void setGlobalEnableState(GlobalEnableState state)
Set global enable/disable state.
Definition: MprSpeexEchoCancel.h:214
MprSpeexEchoCancel & operator=(const MprSpeexEchoCancel &rhs)
Assignment operator (not implemented for this class)
The "Speex Echo Canceler" media processing resource.
Definition: MprSpeexEchoCancel.h:49
UtlContainableType getContainableType() const
UtlBoolean isEnabled() const
Returns TRUE is this resource is currently enabled, FALSE otherwise.
Definition: MpResource.cpp:440
static const UtlContainableType TYPE
Class name, used for run-time checks.
Definition: MprSpeexEchoCancel.h:54
All MprSpeexEchoCancel resources are forced to enable.
Definition: MprSpeexEchoCancel.h:70