18 #include <utl/UtlDefs.h> 19 #include <os/OsStatus.h> 20 #include <utl/UtlString.h> 59 virtual OsStatus
init(
int samplesPerSec) = 0;
69 virtual void reset() = 0;
84 unsigned inSamplesNum) = 0;
103 unsigned inSamplesNum,
104 unsigned outSamplesNum,
105 int wantedAdjustment,
106 int &madeAdjustment) = 0;
191 #endif //_MpPlcBase_h_ virtual void reset()=0
Reset.
virtual int getMaxFutureFramesNum() const =0
Return maximum offset for future frame with respect to current.
Definition: MpPlcBase.h:40
virtual void fullReset()=0
Full reset followed by init call.
static void setDefaultAlgorithm(const UtlString &name)
Set algorithm to be used by default.
Definition: MpPlcBase.cpp:60
virtual int getAlgorithmicDelay() const =0
Return algorithmic delay in samples, should be called after init.
virtual OsStatus init(int samplesPerSec)=0
Initialize PLC with given sample rate and frame size.
virtual ~MpPlcBase()
Virtual base destructor.
Definition: MpPlcBase.h:66
virtual OsStatus processFrame(MpSpeechParams &speechParams, MpAudioSample *pBuf, unsigned bufferSize, unsigned inSamplesNum, unsigned outSamplesNum, int wantedAdjustment, int &madeAdjustment)=0
Process next frame - do PLC and/or adjustment if needed.
int16_t MpAudioSample
Definition: MpTypes.h:44
static MpPlcBase * createPlc(const UtlString &name="")
Factory method for PLC algorithms creation.
Definition: MpPlcBase.cpp:31
virtual OsStatus insertToHistory(int frameNum, const MpSpeechParams &speechParams, MpAudioSample *pBuf, unsigned inSamplesNum)=0
Update PLC history with late/future frame.
virtual int getMaxDelayedFramesNum() const =0
Return maximum offset for delayed frame with respect to current.
static UtlString smDefaultAlgorithm
Name of algorithm to be used by default.
Definition: MpPlcBase.h:182