paec.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef __OPAL_ECHOCANCEL_H
00037 #define __OPAL_ECHOCANCEL_H
00038
00039 #ifdef P_USE_PRAGMA
00040 #pragma interface
00041 #endif
00042
00043 #include <ptclib/qchannel.h>
00044
00053 struct SpeexEchoState;
00054 struct SpeexPreprocessState;
00055 class PAec : public PObject
00056 {
00057 PCLASSINFO(PAec, PObject);
00058 public:
00059
00064 PAec();
00065 ~PAec();
00067
00072 void Send(BYTE * buffer, unsigned & length);
00073
00076 void Receive(BYTE * buffer, unsigned & length);
00078
00079 protected:
00080
00081 PQueueChannel *echo_chan;
00082 SpeexEchoState *echoState;
00083 SpeexPreprocessState *preprocessState;
00084 short *ref_buf;
00085 short *echo_buf;
00086 short *e_buf;
00087 float *noise;
00088
00089 };
00090
00091 #endif // __OPAL_ECHOCANCEL_H
00092